- risolto problema della non attesa della PWA durante la chiamata a Node.js.
- risolto problema dell'ambiente in Locale HTTPS certificato installato aggiornato.
This commit is contained in:
@@ -9,7 +9,7 @@ const i18n = require('i18n');
|
||||
|
||||
const sharp = require('sharp');
|
||||
|
||||
const { authenticate, authenticate_noerror } = require(
|
||||
const { authenticate, authenticate_noerror, authenticate_noerror_WithUser, authenticate_noerror_WithUserLean } = require(
|
||||
'../middleware/authenticate');
|
||||
|
||||
const { ObjectId } = require('mongodb');
|
||||
@@ -1793,19 +1793,34 @@ router.post('/duprec/:table/:id', authenticate, async (req, res) => {
|
||||
|
||||
});
|
||||
|
||||
router.get('/loadsite/:userId/:idapp', authenticate_noerror, (req, res) => {
|
||||
router.get('/loadsite/:userId/:idapp', authenticate_noerror_WithUserLean, (req, res) => {
|
||||
load(req, res, '0');
|
||||
});
|
||||
|
||||
router.get('/loadsite/:userId/:idapp/:vers', authenticate_noerror,
|
||||
async (req, res) => {
|
||||
router.get('/testpao', async (req, res) => {
|
||||
try {
|
||||
// Simulazione di un'operazione asincrona (es. chiamata a DB o altro)
|
||||
// await new Promise(resolve => setTimeout(resolve, 2000));
|
||||
res.status(200).send('OK');
|
||||
} catch (error) {
|
||||
console.error('Errore durante il caricamento del sito:', error);
|
||||
res.status(500).json({ error: 'Errore interno del server: TEST' });
|
||||
}
|
||||
});
|
||||
|
||||
router.get('/loadsite/:userId/:idapp/:vers', authenticate_noerror_WithUserLean, async (req, res) => {
|
||||
try {
|
||||
let versionstr = req.params.vers;
|
||||
|
||||
let version = tools.getVersionint(versionstr);
|
||||
|
||||
return await load(req, res, version);
|
||||
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Errore durante il caricamento del sito:', error);
|
||||
res.status(500).json({ error: 'Errore interno del server' });
|
||||
}
|
||||
});
|
||||
|
||||
async function load(req, res, version = '0') {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user