1
0
Fork 0
forked from mirror/pixelfed

Add /api/v1/domain_blocks endpoint

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

View file

@ -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);

View file

@ -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');