fix order non si vedeva.. e msg login errato

This commit is contained in:
Surya Paolo
2024-01-17 21:49:59 +01:00
parent f6a0876178
commit dbcdbd689b
5 changed files with 68 additions and 52 deletions

View File

@@ -568,6 +568,8 @@ router.post('/login', (req, res) => {
let resalreadysent = false;
const myuser = user;
User.findByCredentials(user.idapp, user.username, user.password).
then(async (user) => {
// tools.mylog("CREDENZIALI ! ");
@@ -576,7 +578,7 @@ router.post('/login', (req, res) => {
const msg = 'Tentativo di Login ERRATO [' + body.username + ' , ' + ']\n' + '[IP: ' + tools.getiPAddressUser(req) +
']';
tools.mylogshow(msg);
await telegrambot.sendMsgTelegramToTheAdmin(user.idapp, msg, true);
await telegrambot.sendMsgTelegramToTheAdmin(myuser.idapp, msg, true);
tools.writeErrorLog(msg);
// telegrambot.sendMsgTelegramToTheManagers(body.idapp, msg);
res.status(404).send({ code: server_constants.RIS_CODE_LOGIN_ERR });