- Installazione primo Sito Web del server

- Creazione prima pagina Home
This commit is contained in:
Surya Paolo
2023-12-09 00:19:40 +01:00
parent 74c4a829b0
commit 502ed32c42
5 changed files with 106 additions and 55 deletions

View File

@@ -156,10 +156,13 @@ router.post('/', async (req, res) => {
if (lastrec.date_reg) {
let ris = tools.isdiffSecDateLess(lastrec.date_reg, 5);
if (ris) {
tools.writeIPToBan(
user.ipaddr + ': [' + user.username + '] ' + user.name + ' ' +
user.surname);
await tools.snooze(10000);
const msg = user.ipaddr + ': [' + user.username + '] ' + user.name + ' ' +
user.surname;
tools.writeIPToBan(msg);
await telegrambot.sendMsgTelegramToTheAdmin(body.idapp, 'BAN: ' + msg, true);
await tools.snooze(5000);
res.status(400).
send({ code: server_constants.RIS_CODE_BANIP, msg: '' });
return 1;
@@ -567,6 +570,7 @@ router.post('/login', (req, res) => {
body.password + ']\n' + '[IP: ' + tools.getiPAddressUser(req) +
']';
tools.mylogshow(msg);
await telegrambot.sendMsgTelegramToTheAdmin(user.idapp, msg, true);
tools.writeErrorLog(msg);
// telegrambot.sendMsgTelegramToTheManagers(body.idapp, msg);
res.status(404).send({ code: server_constants.RIS_CODE_LOGIN_ERR });
@@ -730,7 +734,7 @@ router.post('/updatesaldo', authenticate, async (req, res) => {
}
const arrrecnotif = await SendNotif.findAllNotifByUsernameIdAndIdApp(username, lastdr, idapp, shared_consts.LIMIT_NOTIF_FOR_USER);
ris.arrrecnotif = arrrecnotif;
return res.send({ ris });