mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Add /api/v1/follow_requests/{id}/reject endpoint
This commit is contained in:
parent
7bdd9b2a14
commit
62aa922aed
2 changed files with 17 additions and 0 deletions
|
@ -784,6 +784,22 @@ class ApiV1Controller extends Controller
|
||||||
return response()->json([]);
|
return response()->json([]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POST /api/v1/follow_requests/{id}/reject
|
||||||
|
*
|
||||||
|
* @param integer $id
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
public function accountFollowRequestReject(Request $request, $id)
|
||||||
|
{
|
||||||
|
abort_if(!$request->user(), 403);
|
||||||
|
|
||||||
|
// todo
|
||||||
|
|
||||||
|
return response()->json([]);
|
||||||
|
}
|
||||||
|
|
||||||
public function statusById(Request $request, $id)
|
public function statusById(Request $request, $id)
|
||||||
{
|
{
|
||||||
$status = Status::whereVisibility('public')->findOrFail($id);
|
$status = Status::whereVisibility('public')->findOrFail($id);
|
||||||
|
|
|
@ -105,6 +105,7 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
|
||||||
Route::get('filters', 'Api\ApiV1Controller@accountFilters')->middleware('auth:api');
|
Route::get('filters', 'Api\ApiV1Controller@accountFilters')->middleware('auth:api');
|
||||||
Route::get('follow_requests', 'Api\ApiV1Controller@accountFollowRequests')->middleware('auth:api');
|
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}/authorize', 'Api\ApiV1Controller@accountFollowRequestAccept')->middleware('auth:api');
|
||||||
|
Route::post('follow_requests/{id}/reject', 'Api\ApiV1Controller@accountFollowRequestReject')->middleware('auth:api');
|
||||||
|
|
||||||
Route::get('likes', 'ApiController@hydrateLikes');
|
Route::get('likes', 'ApiController@hydrateLikes');
|
||||||
Route::post('media', 'ApiController@uploadMedia')->middleware('auth:api');
|
Route::post('media', 'ApiController@uploadMedia')->middleware('auth:api');
|
||||||
|
|
Loading…
Reference in a new issue