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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user