feat: FRO-2 Implement Login Component
This commit is contained in:
12
src/main.ts
12
src/main.ts
@@ -15,13 +15,13 @@ import VueAxios from 'vue-axios'
|
||||
const app = createApp(App)
|
||||
const pinia = createPinia()
|
||||
|
||||
app.use(pinia)
|
||||
app.use(router)
|
||||
app.use(Quasar, {
|
||||
plugins: {
|
||||
Notify
|
||||
},
|
||||
})
|
||||
app.use(pinia)
|
||||
app.use(VueAxios, axios)
|
||||
app.use(Particles, {
|
||||
init: async engine => {
|
||||
@@ -29,4 +29,14 @@ app.use(Particles, {
|
||||
},
|
||||
})
|
||||
|
||||
axios.interceptors.response.use(
|
||||
res => res,
|
||||
err => {
|
||||
if (err.response?.status === 401) {
|
||||
router.replace({name: 'login'});
|
||||
}
|
||||
return Promise.reject(err);
|
||||
}
|
||||
);
|
||||
|
||||
app.mount('#app')
|
||||
|
||||
Reference in New Issue
Block a user