Add /api/v1/statuses endpoint

pull/1721/head
Daniel Supernault 6 years ago
parent 10cb2d4004
commit 0a20b8321b
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -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…
Cancel
Save