Add /api/v1/conversations endpoint

This commit is contained in:
Daniel Supernault 2019-09-26 18:41:27 -06:00
parent ae8f688770
commit 336f906968
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 16 additions and 1 deletions

View file

@ -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)

View file

@ -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');