"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

@@ -49,6 +49,9 @@ const MyGoodSchema = new Schema({
adType: {
type: Number,
},
otherfilters: [{
type: Number,
}],
photos: [
{
imagefile: {
@@ -149,6 +152,7 @@ MyGoodSchema.statics.executeQueryTable = function(idapp, params) {
idCity: 1,
numLevel: 1,
adType: 1,
otherfilters: 1,
photos: 1,
note: 1,
website: 1,
@@ -236,6 +240,7 @@ MyGoodSchema.statics.getMyGoodById = function(idapp, idGood) {
'idCity': 1,
'numLevel': 1,
adType: 1,
otherfilters: 1,
'photos': 1,
note: 1,
website: 1,
@@ -288,6 +293,7 @@ MyGoodSchema.statics.getMyGoodById = function(idapp, idGood) {
'idCity': 1,
'numLevel': 1,
adType: 1,
otherfilters: 1,
'photos': 1,
'note': 1,
website: 1,
@@ -340,6 +346,7 @@ MyGoodSchema.statics.getMyGoodById = function(idapp, idGood) {
'idCity': 1,
'numLevel': 1,
adType: 1,
otherfilters: 1,
'photos': 1,
'note': 1,
website: 1,
@@ -392,6 +399,7 @@ MyGoodSchema.statics.getMyGoodById = function(idapp, idGood) {
'idCity': 1,
'numLevel': 1,
adType: 1,
otherfilters: 1,
'photos': 1,
'note': 1,
website: 1,
@@ -444,6 +452,7 @@ MyGoodSchema.statics.getMyGoodById = function(idapp, idGood) {
'idCity': 1,
'numLevel': 1,
adType: 1,
otherfilters: 1,
'photos': 1,
'note': 1,
website: 1,

View File

@@ -65,6 +65,9 @@ const SiteSchema = new Schema({
telegram_bot_name_test: {
type: String,
},
telegram_support_chat: {
type: String,
},
pathreg_add: {
type: String,
},

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},