"Autoprodotto": metterlo come campo e filtro a parte ??

Se non hai l'USERNAME TELEGRAM presente, allora il BOT ti deve dire come fare per impostarlo.
Creare una Chat di Help Supporto Tecnico
This commit is contained in:
paoloar77
2022-02-25 17:24:31 +01:00
parent 714b664c70
commit dac8b38702
9 changed files with 107 additions and 31 deletions

View File

@@ -598,6 +598,8 @@ UserSchema.statics.findByUsername = async function(idapp, username, alsoemail) {
const myreg = ['^', username, '$'].join('');
let regexusername = new RegExp(myreg, 'i');
//++TODO: Set only the necessary fields to get in memory
return User.findOne({
idapp: idapp,
username: {$regex: regexusername},