mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-02-12 14:39:31 -06:00
(Update) Aborts
Replace `abort(403, 'Unauthorized action.’);` use with a graceful toastr error.
This commit is contained in:
@@ -99,7 +99,7 @@ class ImageController extends Controller
|
||||
return redirect()->route('show_album', ['id' => $request->input('new_album')]);
|
||||
}
|
||||
} else {
|
||||
abort(403, 'Unauthorized action.');
|
||||
return back()->with(Toastr::error('You Are Not Authorized To Perform This Action!', 'Error 403', ['options']));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ class ImageController extends Controller
|
||||
return redirect()->route('show_album', ['id' => $image->album_id])
|
||||
->with(Toastr::success('Image has successfully been deleted', 'Yay!', ['options']));
|
||||
} else {
|
||||
abort(403, 'Unauthorized action.');
|
||||
return back()->with(Toastr::error('You Are Not Authorized To Perform This Action!', 'Error 403', ['options']));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user