Merged PR 148: Bug fetch-user

This commit is contained in:
2025-06-05 08:55:40 +00:00
4 changed files with 16 additions and 8 deletions

View File

@@ -41,9 +41,11 @@ var auth = createAuth({
router: driverRouterVueRouter
},
options:{
notFoundRedirect: '/auth/login',
authRedirect: '/auth/login',
loginData: {url: '/api/auth/login', method: 'POST', redirect: '/'},
// notFoundRedirect: '/auth/login',
// authRedirect: '/auth/login',
authRedirect: false, // niente redirect automatici
notFoundRedirect: false,
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}

View File

@@ -7,6 +7,11 @@ const router = createRouter({
routes: [
{
path: '/',
redirect: '/auth/login',
meta: { auth: false }
},
{
path: '/home',
component: AppLayout,
meta: {
auth: true

View File

@@ -297,10 +297,10 @@ const showFileContent = (base64String, type) => {
const jsonObject = JSON.parse(textContent); // Parse JSON
fileContent.value = JSON.stringify(jsonObject, null, 2); // Formatta JSON
} else {
fileContent.value = 'Tipo di file non supportato.';
fileContent.value = 'File type not supported.';
}
} catch (error) {
fileContent.value = 'Errore durante la decodifica o il parsing del file.';
fileContent.value = 'Error while parsing the file.';
console.error(error);
}
};

View File

@@ -36,7 +36,7 @@
auto
:showUploadButton="false"
:showCancelButton="false"
:maxFileSize="20971520"
:maxFileSize="52428800"
:invalidFileSizeMessage="'Invalid file size, file size should be smaller than 20 MB'"
v-model:files="uploadedFiles"
@before-send="onBeforeSend"
@@ -100,7 +100,7 @@
auto
:showUploadButton="false"
:showCancelButton="false"
:maxFileSize="20971520"
:maxFileSize="52428800"
v-model:files="uploadedFiles"
@before-send="onBeforeSend"
>
@@ -332,6 +332,7 @@ const uploadedFiles = ref([]);
const numberPrFiles = ref(0);
const acceptedFormats = ref('.docx');
// :url="`http://localhost:8081/uploadListFiles/${folderName}`"
const errored_execution = ref(false);
// Stato per l'ID univoco della cartella
const uniqueFolderId = ref(generateUniqueId());
@@ -525,7 +526,7 @@ const openDebug = () => {
};
const pollBackendAPI = () => {
const errored_execution = ref(false);
errored_execution.value = false;
axios.get('/scenarios/getExecutionProgress/' + exec_id.value).then((response) => {
if (response.data.status == 'OK' || response.data.status == 'ERROR') {
console.log('Condition met, stopping polling.');