This commit is contained in:
Daniel Supernault 2018-11-22 13:21:36 -07:00
parent 10cfb02a9e
commit 580bfd0bbe
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
8 changed files with 41 additions and 15 deletions

View file

@ -133,8 +133,11 @@ class StatusController extends Controller
if ($status->profile_id === Auth::user()->profile->id || Auth::user()->is_admin == true) {
StatusDelete::dispatch($status);
}
return redirect(Auth::user()->url());
if($request->wantsJson()) {
return response()->json(['Status successfully deleted.']);
} else {
return redirect(Auth::user()->url());
}
}
public function storeShare(Request $request)