mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Add /api/v1/domain_blocks endpoint
This commit is contained in:
parent
bf14743ebd
commit
83a6313f09
2 changed files with 17 additions and 0 deletions
|
@ -623,6 +623,20 @@ class ApiV1Controller extends Controller
|
|||
return response()->json([]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* GET /api/v1/domain_blocks
|
||||
*
|
||||
* Return empty array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function accountDomainBlocks(Request $request)
|
||||
{
|
||||
abort_if(!$request->user(), 403);
|
||||
return response()->json([]);
|
||||
}
|
||||
|
||||
public function statusById(Request $request, $id)
|
||||
{
|
||||
$status = Status::whereVisibility('public')->findOrFail($id);
|
||||
|
|
|
@ -91,6 +91,9 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
|
|||
// 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('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