From 336f90696803cd21017ee6be9de4475f10b98800 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 26 Sep 2019 18:41:27 -0600 Subject: [PATCH] Add /api/v1/conversations endpoint --- app/Http/Controllers/Api/ApiV1Controller.php | 16 +++++++++++++++- routes/web.php | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index b1c8f15dd..920736d47 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -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) diff --git a/routes/web.php b/routes/web.php index f3f31a9f2..ac469c1fc 100644 --- a/routes/web.php +++ b/routes/web.php @@ -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');