1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-25 17:26:43 +00:00

Add /api/v1/custom_emojis endpoint

This commit is contained in:
Daniel Supernault 2019-09-25 01:17:25 -06:00
parent 831b90d097
commit 6e43431a67
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 17 additions and 2 deletions

View file

@ -611,6 +611,18 @@ class ApiV1Controller extends Controller
return response()->json($res);
}
/**
* GET /api/v1/custom_emojis
*
* Return empty array, we don't support custom emoji
*
* @return array
*/
public function customEmojis()
{
return response()->json([]);
}
public function statusById(Request $request, $id)
{
$status = Status::whereVisibility('public')->findOrFail($id);

View file

@ -86,12 +86,13 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
Route::get('accounts/{id}/followers', 'Api\ApiV1Controller@accountFollowersById')->middleware('auth:api');
Route::post('accounts/{id}/follow', 'Api\ApiV1Controller@accountFollowById')->middleware('auth:api');
Route::post('accounts/{id}/unfollow', 'Api\ApiV1Controller@accountUnfollowById')->middleware('auth:api');
Route::get('blocks', 'Api\ApiV1Controller@accountBlocks')->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::get('accounts/{id}', 'PublicApiController@account');
Route::get('accounts/{id}', 'Api\ApiV1Controller@accountById');
Route::post('avatar/update', 'ApiController@avatarUpdate')->middleware('auth:api');
Route::get('blocks', 'Api\ApiV1Controller@accountBlocks')->middleware('auth:api');
Route::get('custom_emojis', 'Api\ApiV1Controller@customEmojis');
Route::get('likes', 'ApiController@hydrateLikes');
Route::post('media', 'ApiController@uploadMedia')->middleware('auth:api');
Route::delete('media', 'ApiController@deleteMedia')->middleware('auth:api');
@ -124,9 +125,11 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
Route::get('accounts/{id}/statuses', 'PublicApiController@accountStatuses');
Route::get('accounts/{id}/following', 'PublicApiController@accountFollowing');
Route::get('accounts/{id}/followers', 'PublicApiController@accountFollowers');
Route::post('accounts/{id}/block', 'Api\ApiV1Controller@accountBlockById');
Route::post('accounts/{id}/unblock', 'Api\ApiV1Controller@accountUnblockById');
Route::get('accounts/{id}', 'PublicApiController@account');
Route::post('avatar/update', 'ApiController@avatarUpdate');
Route::get('blocks', 'Api\ApiV1Controller@accountBlocks');
Route::get('custom_emojis', 'Api\ApiV1Controller@customEmojis');
Route::get('likes', 'ApiController@hydrateLikes');
Route::post('media', 'ApiController@uploadMedia');
Route::delete('media', 'ApiController@deleteMedia');