From 581e565c6c5dbac6b76f9df3a76c026c00afd2d2 Mon Sep 17 00:00:00 2001 From: Emanuele Ferrelli Date: Wed, 4 Jun 2025 13:41:39 +0200 Subject: [PATCH] Update auth --- src/main.js | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/main.js b/src/main.js index 367d3dd..8793216 100644 --- a/src/main.js +++ b/src/main.js @@ -14,13 +14,10 @@ import Nora from '@primevue/themes/nora'; import PrimeVue from 'primevue/config'; import ConfirmationService from 'primevue/confirmationservice'; import ToastService from 'primevue/toastservice'; - import BlockViewer from '@/components/BlockViewer.vue'; - import '@/assets/styles.scss'; import '@/assets/tailwind.css'; import { config } from 'md-editor-v3'; - import { LoadingStore } from './stores/LoadingStore.js'; @@ -46,18 +43,14 @@ var auth = createAuth({ options:{ notFoundRedirect: '/auth/login', authRedirect: '/auth/login', - /* loginData: {url: '../api/auth/login', method: 'POST', redirect: '/'}, - logoutData: {url:'../api/auth/logout', redirect: '/auth/login'}, - fetchData: {url: '../api/auth/fetch-user', method: 'GET', enabled: true}, - refreshData: {url: '../api/auth/refresh-token', method: 'GET', enabled: true}*/ loginData: {url: '/api/auth/login', method: 'POST', redirect: '/'}, - logoutData: {url:'/api/auth/logout', redirect: '/auth/login'}, - fetchData: {url: '/api/auth/fetch-user', method: 'GET', enabled: true}, - refreshData: {url: '/api/auth/refresh-token', method: 'GET', enabled: true} + logoutData: {url: '/api/auth/logout', redirect: '/auth/login'}, + fetchData: {url: '/api/auth/fetch-user', method: 'GET', enabled: false}, + refreshData: {url: '/api/auth/refresh-token', method: 'GET', enabled: false} } }); -axios.defaults.baseURL = import.meta.env.VITE_BACKEND_URL;//'http://localhost:8081'/// +axios.defaults.baseURL = import.meta.env.VITE_BACKEND_URL; //axios.defaults.baseURL ='http://localhost:8081'; @@ -153,8 +146,7 @@ app.component('BlockViewer', BlockViewer); app.mount('#app'); -const loadingStore = LoadingStore() - +const loadingStore = LoadingStore(); axios.interceptors.request.use(function (config) { loadingStore.another_loading = true;