Circuits...

Circuits Fido e Max Qta
Fixed error eslint: 7.0.0 is OK
This commit is contained in:
Paolo Arena
2022-09-11 11:45:33 +02:00
parent d262f94315
commit d62888083b
100 changed files with 3699 additions and 2774 deletions

View File

@@ -1,4 +1,4 @@
const mongoose = require('mongoose').set('debug', false);
const mongoose = require('mongoose').set('debug', process.env.DEBUG);
const Schema = mongoose.Schema;
mongoose.Promise = global.Promise;
@@ -308,6 +308,9 @@ sendNotifSchema.statics.getDescrAndLinkByRecNotif = function(recnotif) {
newdescr = i18n.__('CIRCUIT_SENDCOINSREQ', recnotif.paramsObj.username_action, recnotif.paramsObj.extrarec.qty, recnotif.paramsObj.extrarec.symbol);
tag = 'sendcoin';
recnotif.openUrl = '/circuit/' + recnotif.paramsObj.path; //++Todo: dove lo mando ?
} else if (recnotif.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_COINS_ACCEPTED) {
newdescr = i18n.__('ID_CIRCUIT_COINS_ACCEPTED', recnotif.paramsObj.extrarec.qty, recnotif.paramsObj.extrarec.symbol, recnotif.paramsObj.username_action);
tag = 'sendcoin';
}
}
@@ -460,6 +463,12 @@ sendNotifSchema.statics.updateStatusAndDescr = async function(myrecnotif, onlysa
newstatus = shared_consts.CircuitsNotif.STATUS_BLOCKED;
} else if (myrecnotif.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_DELETE_USER) {
newstatus = shared_consts.CircuitsNotif.STATUS_DELETED;
} else if (myrecnotif.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_COINS_ACCEPTED) {
typeidsearch = shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ;
newstatus = shared_consts.CircuitsNotif.STATUS_COINS_ACCEPTED;
} else if (myrecnotif.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_COINS_REFUSED) {
typeidsearch = shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ;
newstatus = shared_consts.CircuitsNotif.STATUS_COINS_REFUSED;
}
}
@@ -511,7 +520,7 @@ sendNotifSchema.statics.saveNotif = async function(myrecnotif) {
if (!myrecout)
return null;
return myrecout.save().then((writeresult) => {
return await myrecout.save().then((writeresult) => {
let idobj = writeresult._id;
return SendNotif.findById(idobj).lean().then(async (recnotif) => {
return recnotif;