mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 15:55:22 +00:00
Add /api/v1/suggestions endpoint
This commit is contained in:
parent
62aa922aed
commit
e52aeeedad
2 changed files with 17 additions and 0 deletions
|
@ -800,6 +800,22 @@ class ApiV1Controller extends Controller
|
|||
return response()->json([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /api/v1/suggestions
|
||||
*
|
||||
* Return empty array as we don't support suggestions
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
public function accountSuggestions(Request $request)
|
||||
{
|
||||
abort_if(!$request->user(), 403);
|
||||
|
||||
// todo
|
||||
|
||||
return response()->json([]);
|
||||
}
|
||||
|
||||
public function statusById(Request $request, $id)
|
||||
{
|
||||
$status = Status::whereVisibility('public')->findOrFail($id);
|
||||
|
|
|
@ -106,6 +106,7 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
|
|||
Route::get('follow_requests', 'Api\ApiV1Controller@accountFollowRequests')->middleware('auth:api');
|
||||
Route::post('follow_requests/{id}/authorize', 'Api\ApiV1Controller@accountFollowRequestAccept')->middleware('auth:api');
|
||||
Route::post('follow_requests/{id}/reject', 'Api\ApiV1Controller@accountFollowRequestReject')->middleware('auth:api');
|
||||
Route::get('suggestions', 'Api\ApiV1Controller@accountSuggestions')->middleware('auth:api');
|
||||
|
||||
Route::get('likes', 'ApiController@hydrateLikes');
|
||||
Route::post('media', 'ApiController@uploadMedia')->middleware('auth:api');
|
||||
|
|
Loading…
Reference in a new issue