mirror of
https://github.com/mgerb/classic-wow-forums
synced 2026-01-11 17:42:48 +00:00
client - support for admin/mod users
This commit is contained in:
@@ -29,9 +29,13 @@ export const initializeAxios = (): Promise<void> => {
|
||||
return config;
|
||||
},
|
||||
(error: any) => {
|
||||
nprogress.done();
|
||||
|
||||
// if code is unauthorized (401) then logout if already logged in
|
||||
if (error.response.status === 401 && userStore.user) {
|
||||
userStore.resetUser();
|
||||
// redirect back to home page upon logout
|
||||
window.location.pathname = '/';
|
||||
}
|
||||
|
||||
return Promise.reject(error);
|
||||
|
||||
Reference in New Issue
Block a user