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

@@ -76,19 +76,19 @@ module.exports.getProducerByTitle = function (query,sort, callback) {
}
module.exports.filterProducerByDepartment = function (department, callback) {
let regexp = new RegExp(`${department}`, 'i')
let regexp = new RegExp(`^${department}$`, 'i')
var query = { department: { $regex: regexp } };
Producer.find(query, callback)
}
module.exports.filterProducerByCategory = function (category, callback) {
let regexp = new RegExp(`${category}`, 'i')
let regexp = new RegExp(`^${category}$`, 'i')
var query = { category: { $regex: regexp } };
Producer.find(query, callback);
}
module.exports.filterProducerByTitle = function (title, callback) {
let regexp = new RegExp(`${title}`, 'i')
let regexp = new RegExp(`^${title}$`, 'i')
var query = { title: { $regex: regexp } };
Producer.find(query, callback);
}