Refactor imports and enable token refresh in auth configuration
This commit is contained in:
14
src/main.js
14
src/main.js
@@ -9,15 +9,15 @@ import App from './App.vue';
|
||||
import router from './router';
|
||||
|
||||
|
||||
import '@/assets/styles.scss';
|
||||
import '@/assets/tailwind.css';
|
||||
import BlockViewer from '@/components/BlockViewer.vue';
|
||||
import { definePreset } from '@primevue/themes';
|
||||
import Nora from '@primevue/themes/nora';
|
||||
import { config } from 'md-editor-v3';
|
||||
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';
|
||||
|
||||
|
||||
@@ -48,12 +48,12 @@ var auth = createAuth({
|
||||
loginData: {url: '/api/auth/login', method: 'POST', redirect: '/home'},
|
||||
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}
|
||||
refreshData: {url: '/api/auth/refresh-token', method: 'GET', enabled: true}
|
||||
}
|
||||
});
|
||||
|
||||
axios.defaults.baseURL = import.meta.env.VITE_BACKEND_URL;
|
||||
//axios.defaults.baseURL ='http://localhost:8081';
|
||||
axios.defaults.baseURL = import.meta.env.VITE_BACKEND_URL;
|
||||
axios.defaults.baseURL ='http://localhost:8081';
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user