File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
webservice/app/Exceptions Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ http.interceptors.response.use(
2828 * then redirect to login. On server side the error
2929 * messages can be changed on app/Providers/EventServiceProvider.php
3030 */
31- if ( error . response . data . reason === 'token' ) {
31+ if ( error . response . status === 401 ) {
3232 router . push ( { name : 'login.index' } )
3333 }
3434 /**
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ protected function handleExceptionJsonResponse(Exception $exception)
7676 protected function unauthenticated ($ request , AuthenticationException $ exception )
7777 {
7878 if ($ request ->expectsJson ()) {
79- return response ()->json (['error ' => 'Unauthenticated. ' ], 401 );
79+ return response ()->json (['error ' => [ 'Unauthenticated. ' ] ], 401 );
8080 }
8181
8282 return redirect ()->guest ('login ' );
You can’t perform that action at this time.
0 commit comments