forked from mirror/pixelfed
Add /api/v1/endorsements endpoint
This commit is contained in:
parent
9f8661e33e
commit
1f16221eb2
2 changed files with 16 additions and 1 deletions
|
@ -623,7 +623,6 @@ class ApiV1Controller extends Controller
|
|||
return response()->json([]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* GET /api/v1/domain_blocks
|
||||
*
|
||||
|
@ -637,6 +636,19 @@ class ApiV1Controller extends Controller
|
|||
return response()->json([]);
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /api/v1/endorsements
|
||||
*
|
||||
* Return empty array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function accountEndorsements(Request $request)
|
||||
{
|
||||
abort_if(!$request->user(), 403);
|
||||
return response()->json([]);
|
||||
}
|
||||
|
||||
public function statusById(Request $request, $id)
|
||||
{
|
||||
$status = Status::whereVisibility('public')->findOrFail($id);
|
||||
|
|
|
@ -88,12 +88,15 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
|
|||
Route::post('accounts/{id}/unfollow', 'Api\ApiV1Controller@accountUnfollowById')->middleware('auth:api');
|
||||
Route::post('accounts/{id}/block', 'Api\ApiV1Controller@accountBlockById')->middleware('auth:api');
|
||||
Route::post('accounts/{id}/unblock', 'Api\ApiV1Controller@accountUnblockById')->middleware('auth:api');
|
||||
Route::post('accounts/{id}/pin', 'Api\ApiV1Controller@accountEndorsements')->middleware('auth:api');
|
||||
Route::post('accounts/{id}/unpin', 'Api\ApiV1Controller@accountEndorsements')->middleware('auth:api');
|
||||
// Route::get('accounts/{id}', 'PublicApiController@account');
|
||||
Route::get('accounts/{id}', 'Api\ApiV1Controller@accountById');
|
||||
Route::post('avatar/update', 'ApiController@avatarUpdate')->middleware('auth:api');
|
||||
Route::get('domain_blocks', 'Api\ApiV1Controller@accountDomainBlocks')->middleware('auth:api');
|
||||
Route::post('domain_blocks', 'Api\ApiV1Controller@accountDomainBlocks')->middleware('auth:api');
|
||||
Route::delete('domain_blocks', 'Api\ApiV1Controller@accountDomainBlocks')->middleware('auth:api');
|
||||
Route::get('endorsements', 'Api\ApiV1Controller@accountEndorsements')->middleware('auth:api');
|
||||
Route::get('blocks', 'Api\ApiV1Controller@accountBlocks')->middleware('auth:api');
|
||||
Route::get('custom_emojis', 'Api\ApiV1Controller@customEmojis');
|
||||
Route::get('likes', 'ApiController@hydrateLikes');
|
||||
|
|
Loading…
Reference in a new issue