Merged PR 146: Update auth
Update auth
This commit is contained in:
18
src/main.js
18
src/main.js
@@ -14,13 +14,10 @@ import Nora from '@primevue/themes/nora';
|
|||||||
import PrimeVue from 'primevue/config';
|
import PrimeVue from 'primevue/config';
|
||||||
import ConfirmationService from 'primevue/confirmationservice';
|
import ConfirmationService from 'primevue/confirmationservice';
|
||||||
import ToastService from 'primevue/toastservice';
|
import ToastService from 'primevue/toastservice';
|
||||||
|
|
||||||
import BlockViewer from '@/components/BlockViewer.vue';
|
import BlockViewer from '@/components/BlockViewer.vue';
|
||||||
|
|
||||||
import '@/assets/styles.scss';
|
import '@/assets/styles.scss';
|
||||||
import '@/assets/tailwind.css';
|
import '@/assets/tailwind.css';
|
||||||
import { config } from 'md-editor-v3';
|
import { config } from 'md-editor-v3';
|
||||||
|
|
||||||
import { LoadingStore } from './stores/LoadingStore.js';
|
import { LoadingStore } from './stores/LoadingStore.js';
|
||||||
|
|
||||||
|
|
||||||
@@ -46,18 +43,14 @@ var auth = createAuth({
|
|||||||
options:{
|
options:{
|
||||||
notFoundRedirect: '/auth/login',
|
notFoundRedirect: '/auth/login',
|
||||||
authRedirect: '/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: '/'},
|
loginData: {url: '/api/auth/login', method: 'POST', redirect: '/'},
|
||||||
logoutData: {url:'/api/auth/logout', redirect: '/auth/login'},
|
logoutData: {url: '/api/auth/logout', redirect: '/auth/login'},
|
||||||
fetchData: {url: '/api/auth/fetch-user', method: 'GET', enabled: true},
|
fetchData: {url: '/api/auth/fetch-user', method: 'GET', enabled: false},
|
||||||
refreshData: {url: '/api/auth/refresh-token', method: 'GET', enabled: true}
|
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';
|
//axios.defaults.baseURL ='http://localhost:8081';
|
||||||
|
|
||||||
|
|
||||||
@@ -153,8 +146,7 @@ app.component('BlockViewer', BlockViewer);
|
|||||||
|
|
||||||
app.mount('#app');
|
app.mount('#app');
|
||||||
|
|
||||||
const loadingStore = LoadingStore()
|
const loadingStore = LoadingStore();
|
||||||
|
|
||||||
|
|
||||||
axios.interceptors.request.use(function (config) {
|
axios.interceptors.request.use(function (config) {
|
||||||
loadingStore.another_loading = true;
|
loadingStore.another_loading = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user