Commit 3372941 1 parent 8454e74 commit 3372941 Copy full SHA for 3372941
File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ axios.defaults.withXSRFToken = true;
27
27
axios . defaults . withCredentials = true ;
28
28
// Set accept header
29
29
axios . defaults . headers . common [ "X-Requested-With" ] = "XMLHttpRequest" ;
30
- axios . defaults . baseURL = import . meta. env . VITE_API_URL ;
30
+ // axios.defaults.baseURL = import.meta.env.VITE_API_URL;
31
31
32
32
axios . interceptors . response . use (
33
33
( response ) => response ,
@@ -37,6 +37,8 @@ axios.interceptors.response.use(
37
37
router . push ( { name : "login-otp" } ) ;
38
38
} else if ( error . response ?. status === 429 ) {
39
39
router . push ( { name : "429" } ) ;
40
+ } else if ( error . response ?. status === 401 ) {
41
+ router . push ( { name : "login" } ) ;
40
42
}
41
43
return Promise . reject ( error ) ;
42
44
}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export default class extends baseGate {
17
17
route ( ) : false | RouteLocationRaw {
18
18
// If the route was supposed to be login-otp, we should redirect to login-otp, else just login
19
19
return {
20
- name : "login/ otp" ,
20
+ name : "login- otp" ,
21
21
} ;
22
22
}
23
23
}
You can’t perform that action at this time.
0 commit comments