- fixed server versioni precedenti (getEnableTokenExpiredByIdApp dava errore perchè confpages non esiste nelle vecchie versioni ...)

This commit is contained in:
Surya Paolo
2024-04-19 15:44:34 +02:00
parent e6009f66b9
commit 11955b3242
3 changed files with 5 additions and 1 deletions

View File

@@ -96,6 +96,9 @@ const authenticate_noerror = (req, res, next) => {
req.token = null; req.token = null;
req.access = null; req.access = null;
req.code = 0; req.code = 0;
// Continua comunque !
next();
}); });
} catch (e) { } catch (e) {
console.error('Err', e); console.error('Err', e);

View File

@@ -1394,6 +1394,7 @@ router.get('/loadsite/:userId/:idapp/:vers', authenticate_noerror,
}); });
function load(req, res, version) { function load(req, res, version) {
const userId = req.params.userId; const userId = req.params.userId;
const idapp = req.params.idapp; const idapp = req.params.idapp;

View File

@@ -1700,7 +1700,7 @@ module.exports = {
getEnableTokenExpiredByIdApp: function (idapp) { getEnableTokenExpiredByIdApp: function (idapp) {
const myapp = this.MYAPPS.find(item => item.idapp === idapp); const myapp = this.MYAPPS.find(item => item.idapp === idapp);
if (myapp) { if (myapp && myapp.confpages && myapp.confpages.hasOwnProperty('enableTokenExpired')) {
return myapp.confpages.enableTokenExpired; return myapp.confpages.enableTokenExpired;
} }