Update ApiV1Controller, add trends endpoint

This commit is contained in:
Daniel Supernault 2022-03-24 22:57:04 -06:00
parent 8c65d60b77
commit d40a84533a
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 15 additions and 2 deletions

View file

@ -2696,8 +2696,7 @@ class ApiV1Controller extends Controller
return $this->json($ids);
}
/**
/**
* GET /api/v1/preferences
*
*
@ -2717,4 +2716,17 @@ class ApiV1Controller extends Controller
'reading:expand:spoilers' => false
]);
}
/**
* GET /api/v1/trends
*
*
* @return array
*/
public function getTrends(Request $request)
{
abort_if(!$request->user(), 403);
return $this->json([]);
}
}

View file

@ -85,6 +85,7 @@ Route::group(['prefix' => 'api'], function() use($middleware) {
Route::get('discover/posts', 'Api\ApiV1Controller@discoverPosts')->middleware($middleware);
Route::get('preferences', 'Api\ApiV1Controller@getPreferences')->middleware($middleware);
Route::get('trends', 'Api\ApiV1Controller@getTrends')->middleware($middleware);
});
Route::group(['prefix' => 'v2'], function() use($middleware) {