From dba172dfe747a4b4d3400b7c8a4d36178516a583 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 25 Sep 2019 22:12:39 -0600 Subject: [PATCH] Add /api/v1/accounts/{id}/lists endpoint --- app/Http/Controllers/Api/ApiV1Controller.php | 14 ++++++++++++++ routes/web.php | 2 ++ 2 files changed, 16 insertions(+) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 3914024e..d36052be 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -859,6 +859,20 @@ class ApiV1Controller extends Controller return response()->json([]); } + /** + * GET /api/v1/accounts/{id}/lists + * + * @param integer $id + * + * @return null + */ + public function accountListsById(Request $request, $id) + { + abort_if(!$request->user(), 403); + + return response()->json([]); + } + public function statusById(Request $request, $id) { $status = Status::whereVisibility('public')->findOrFail($id); diff --git a/routes/web.php b/routes/web.php index 9eb5c7ba..6de22b8e 100644 --- a/routes/web.php +++ b/routes/web.php @@ -108,6 +108,8 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact Route::post('follow_requests/{id}/reject', 'Api\ApiV1Controller@accountFollowRequestReject')->middleware('auth:api'); Route::get('suggestions', 'Api\ApiV1Controller@accountSuggestions')->middleware('auth:api'); Route::get('lists', 'Api\ApiV1Controller@accountLists')->middleware('auth:api'); + Route::get('accounts/{id}/lists', 'Api\ApiV1Controller@accountListsById')->middleware('auth:api'); + Route::get('lists/{id}/accounts', 'Api\ApiV1Controller@accountListsById')->middleware('auth:api'); Route::get('likes', 'ApiController@hydrateLikes'); Route::post('media', 'ApiController@uploadMedia')->middleware('auth:api');