Nuovo Sistema di registrazione:

tramite il BOT, viene memorizzato l'username telegram e si usa quello come username per la APP, e l'ID telegram viene passato direttamente, senza chiedere la verifica.

- ospitalità (inizio).
This commit is contained in:
Paolo Arena
2022-05-04 00:26:12 +02:00
parent 5139d321b5
commit 311e714d7d
9 changed files with 720 additions and 91 deletions

View File

@@ -162,19 +162,19 @@ module.exports.getProductByCode = function (idapp, code) {
}
module.exports.filterProductByDepartment = function (department, callback) {
let regexp = new RegExp(`${department}`, 'i')
let regexp = new RegExp(`^${department}$`, 'i')
var query = { department: { $regex: regexp } };
Product.find(query, callback)
}
module.exports.filterProductByCategory = function (category, callback) {
let regexp = new RegExp(`${category}`, 'i')
let regexp = new RegExp(`^${category}$`, 'i')
var query = { category: { $regex: regexp } };
Product.find(query, callback);
}
module.exports.filterProductByTitle = function (title, callback) {
let regexp = new RegExp(`${title}`, 'i')
let regexp = new RegExp(`^${title}$`, 'i')
var query = { title: { $regex: regexp } };
Product.find(query, callback);
}