- MultiDominio: api.riso.app, api.gruppomacro.app

This commit is contained in:
Surya Paolo
2024-07-23 12:25:10 +02:00
parent 017ac82d8b
commit 21862f87a1
17 changed files with 484 additions and 97 deletions

View File

@@ -721,11 +721,14 @@ router.post('/login', checkBlocked, (req, res) => {
failedLoginAttempts[body.username]++;
}
let numvolteerrati = failedLoginAttempts[body.username];
const msg = 'Tentativo (' + failedLoginAttempts[body.username] + ') di Login ERRATO [' + body.username + ' , ' + ']\n' + '[IP: ' + tools.getiPAddressUser(req) + ']';
tools.mylogshow(msg);
await telegrambot.sendMsgTelegramToTheAdmin(myuser.idapp, msg, true);
tools.writeErrorLog(msg);
if (numvolteerrati > 2) {
const msg = 'Tentativo (' + numvolteerrati + ') di Login ERRATO [' + body.username + ' , ' + ']\n' + '[IP: ' + tools.getiPAddressUser(req) + ']';
tools.mylogshow(msg);
await telegrambot.sendMsgTelegramToTheAdmin(myuser.idapp, msg, true);
tools.writeErrorLog(msg);
}
// telegrambot.sendMsgTelegramToTheManagers(body.idapp, msg);
if (failedLoginAttempts[body.username] >= MAX_FAILED_ATTEMPTS) {
@@ -1623,7 +1626,7 @@ async function eseguiDbOp(idapp, mydata, locale, req, res) {
await Circuit.createCircuitIfNotExist(req, idapp, recprov.prov);
}
} else if (mydata.dbop === 'correggiProductTypes') {
} else if (mydata.dbop === 'correggiProductTypes') {
await ProductInfo.correggiProductTypes();
@@ -1634,7 +1637,7 @@ async function eseguiDbOp(idapp, mydata, locale, req, res) {
{},
{ $pull: { "profile.mycircuits": { "circuitname": null } } }
);
} else if (mydata.dbop === 'ImpostaMinMaxPersonali') {
await Account.SetMinMaxPersonali(idapp, mydata.valmin, mydata.valmax, '');