forked from mirror/pixelfed
Add /api/v1/conversations endpoint
This commit is contained in:
parent
ae8f688770
commit
336f906968
2 changed files with 16 additions and 1 deletions
|
@ -1219,7 +1219,21 @@ class ApiV1Controller extends Controller
|
|||
|
||||
$fractal = new Fractal\Resource\Collection($timeline, new StatusTransformer());
|
||||
$res = $this->fractal->createData($fractal)->toArray();
|
||||
return response()->json($res, 200, [], JSON_PRETTY_PRINT);
|
||||
return response()->json($res);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /api/v1/conversations
|
||||
*
|
||||
* Not implemented
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function conversations(Request $request)
|
||||
{
|
||||
abort_if(!$request->user(), 403);
|
||||
|
||||
return response()->json([]);
|
||||
}
|
||||
|
||||
public function statusById(Request $request, $id)
|
||||
|
|
|
@ -117,6 +117,7 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
|
|||
Route::get('notifications', 'Api\ApiV1Controller@accountNotifications')->middleware('auth:api');
|
||||
|
||||
Route::get('timelines/home', 'Api\ApiV1Controller@timelineHome')->middleware('auth:api');
|
||||
Route::get('conversations', 'Api\ApiV1Controller@conversations')->middleware('auth:api');
|
||||
|
||||
// Route::get('likes', 'ApiController@hydrateLikes');
|
||||
// Route::post('media', 'ApiController@uploadMedia')->middleware('auth:api');
|
||||
|
|
Loading…
Reference in a new issue