1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-25 01:05:36 +00:00

Add /api/v1/statuses endpoint

This commit is contained in:
Daniel Supernault 2019-09-29 00:09:01 -06:00
parent 10cb2d4004
commit 0a20b8321b
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -1570,8 +1570,16 @@ class ApiV1Controller extends Controller
*
* @return null
*/
public function statusDelete(Request $request)
public function statusDelete(Request $request, $id)
{
abort_if(!$request->user(), 403);
$status = Status::whereProfileId($request->user()->profile->id)
->findOrFail($id);
Cache::forget('profile:status_count:'.$status->profile_id);
StatusDelete::dispatch($status);
return response()->json(['Status successfully deleted.']);
}
}