mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 15:55:22 +00:00
Add /api/v1/statuses endpoint
This commit is contained in:
parent
10cb2d4004
commit
0a20b8321b
1 changed files with 9 additions and 1 deletions
|
@ -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.']);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue