1
0
Fork 0
forked from mirror/pixelfed

Add /api/v1/follow_requests/{id}/authorize endpoint

This commit is contained in:
Daniel Supernault 2019-09-25 21:56:56 -06:00
parent 9726913622
commit 7bdd9b2a14
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 17 additions and 0 deletions

View file

@ -768,6 +768,22 @@ class ApiV1Controller extends Controller
return response()->json($res); return response()->json($res);
} }
/**
* POST /api/v1/follow_requests/{id}/authorize
*
* @param integer $id
*
* @return null
*/
public function accountFollowRequestAccept(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);

View file

@ -104,6 +104,7 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
Route::post('statuses/{id}/unfavourite', 'Api\ApiV1Controller@statusUnfavouriteById')->middleware('auth:api'); Route::post('statuses/{id}/unfavourite', 'Api\ApiV1Controller@statusUnfavouriteById')->middleware('auth:api');
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::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');