Attacco SPAM

This commit is contained in:
Paolo Arena
2020-07-13 23:35:05 +02:00
parent 61f42244d7
commit 4e59979efd
5 changed files with 102 additions and 12 deletions

View File

@@ -2174,6 +2174,19 @@ UserSchema.statics.convSubAccount = async function (idapp) {
return { num };
};
UserSchema.statics.getLastRec = async function (idapp) {
const User = this;
lastrec = await User.find({ idapp }).sort({ date_reg: -1 }).limit(1);
if (!!lastrec) {
return lastrec[0];
} else {
return null;
}
};
UserSchema.statics.DbOp = async function (idapp, mydata) {
const User = this;
try {