mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update ApiV1Controller, add trends endpoint
This commit is contained in:
parent
8c65d60b77
commit
d40a84533a
2 changed files with 15 additions and 2 deletions
|
@ -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([]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue