mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-20 23:33:45 +02:00
Treat unauthenticated exceptions the same as everything else
This commit is contained in:
@@ -231,7 +231,7 @@ class Handler extends ExceptionHandler
|
|||||||
protected function unauthenticated($request, AuthenticationException $exception)
|
protected function unauthenticated($request, AuthenticationException $exception)
|
||||||
{
|
{
|
||||||
if ($request->expectsJson()) {
|
if ($request->expectsJson()) {
|
||||||
return response()->json(['error' => 'Unauthenticated.'], 401);
|
return response()->json(self::convertToArray($exception), 401);
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect()->guest(route('auth.login'));
|
return redirect()->guest(route('auth.login'));
|
||||||
|
|||||||
Reference in New Issue
Block a user