la creazione dell'annuncio impiega troppo tempo (e le persone cliccavano su "Salva" più volte)...

This commit is contained in:
Surya Paolo
2023-06-18 22:29:06 +02:00
parent 95a812f002
commit 3393af36aa
7 changed files with 277 additions and 246 deletions

View File

@@ -1452,7 +1452,7 @@ module.exports = {
},
checkUserOk(userpassed, userauth, res) {
this.mylog('checkUserOk', userpassed, userauth);
// this.mylog('checkUserOk', userpassed, userauth);
if (String(userpassed) !== String(userauth)) {
// I'm trying to write something not mine!
this.mylog('I\'m trying to write something not mine!: userId = ', userpassed, 'req.user._id', userauth);

View File

@@ -288,7 +288,7 @@ module.exports = {
SendMsgToParam: async function (idapp, params) {
try {
console.log('SendMsgToParam', params.typesend);
// console.log('SendMsgToParam', params.typesend, params.typemsg);
const { User } = require('../models/user');
@@ -414,7 +414,7 @@ module.exports = {
text = tools.getContentNotifByParams(params, mycontent, shared_consts.TypeSend.TELEGRAM);
if (telegid > 0) {
risult = await telegrambot.local_sendMsgTelegramByIdTelegram(idapp, telegid, text);
await tools.snooze(50);
await tools.snooze(25);
textsent = risult.text;
}
@@ -434,7 +434,8 @@ module.exports = {
}
if (nummsgsent > 0) {
console.log('FINE Invio Messaggi ! Inviati Totali: ', nummsgsent, 'su', numrec);
if (nummsgsent != numrec && (numrec !== 1))
console.log('FINE Invio Messaggi ! Inviati Totali: ', nummsgsent, 'su', numrec);
}
return {