- fix quantità corretta sulla email e dimensione dell'immagine
This commit is contained in:
@@ -1661,6 +1661,15 @@ UserSchema.methods.removeToken = function (token) {
|
||||
});
|
||||
};
|
||||
|
||||
// # Rimuove tutti i tokens di tutti gli utenti con idapp
|
||||
UserSchema.statics.SvuotaTuttiGliAccessiOnlineConToken = async function (idapp) {
|
||||
const User = this;
|
||||
|
||||
return await User.updateMany({ idapp },
|
||||
{ $set: { tokens: [] } });
|
||||
};
|
||||
|
||||
|
||||
UserSchema.statics.getEmailByUsername = async function (idapp, username) {
|
||||
const User = this;
|
||||
|
||||
|
||||
@@ -1359,6 +1359,8 @@ async function eseguiDbOp(idapp, mydata, locale, req, res) {
|
||||
{ $set: { news_on: true } },
|
||||
{ new: false });
|
||||
|
||||
} else if (mydata.dbop === 'SvuotaTuttiGliAccessiOnlineConToken') {
|
||||
await User.SvuotaTuttiGliAccessiOnlineConToken(idapp);
|
||||
} else if (mydata.dbop === 'removeRegulations') {
|
||||
await Circuit.updateMany({}, { $set: { regulation: '' } });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user