- Cloudflare e configurazione dominio DNS (host, host_test, host_ip, ecc...)

This commit is contained in:
Surya Paolo
2024-09-09 21:49:25 +02:00
parent fe4a67c9f1
commit 13322a7e0b
7 changed files with 166 additions and 26 deletions

View File

@@ -1708,8 +1708,24 @@ router.get(process.env.LINK_CHECK_UPDATES, authenticate_noerror, async (req, res
await CfgServer.find({ idapp }).then(async (arrcfgrec) => {
if (!arrcfgrec)
return res.status(404).send();
if (arrcfgrec.length === 0) {
if (User.isAdmin(req.user.perm)) {
// crea un nuovo record
const mycfgServer = new CfgServer();
mycfgServer.idapp = idapp;
mycfgServer.chiave = 'vers';
mycfgServer.userId = 'ALL';
mycfgServer.valore = await tools.getVersServer();
mycfgServer.save();
arrcfgrec = await CfgServer.find({ idapp })
} else {
return res.status(404).send();
}
}
// ++Add to Log Stat ....
@@ -1887,8 +1903,7 @@ function uploadFile(req, res, version) {
tofile = mydir + '/' + file.originalFilename;
let newname = tofile;
file.path = newname;
// console.log('fromfile', fromfile)
// console.log('tofile', tofile);
console.log('fromfile', fromfile, 'tofile', tofile)
if (!tools.sulServer()) {