mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
Updated exception handler
This commit is contained in:
parent
1023fa3edd
commit
5909860c5a
|
@ -105,7 +105,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' => 'Unauthorized.'], 401);
|
return response()->json(['error' => 'Unauthorized or unauthenticated.'], 401);
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect()->guest('login');
|
return redirect()->guest('login');
|
||||||
|
|
Loading…
Reference in a new issue