Merge pull request #4275 from themsaid/updateAuthJSONError
Update JSON error message structure
This commit is contained in:
commit
38a8390ce7
|
@ -52,7 +52,7 @@ public function render($request, Exception $exception)
|
|||
protected function unauthenticated($request, AuthenticationException $exception)
|
||||
{
|
||||
return $request->expectsJson()
|
||||
? response()->json(['error' => 'Unauthenticated.'], 401)
|
||||
? response()->json(['message' => 'Unauthenticated.'], 401)
|
||||
: redirect()->guest(route('login'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue