Nuovo Sistema di registrazione, Completato.

This commit is contained in:
Paolo Arena
2022-05-05 00:38:41 +02:00
parent 311e714d7d
commit b340d39348
5 changed files with 33 additions and 9 deletions

View File

@@ -127,10 +127,27 @@ module.exports.executeQueryTable = async function (idapp, params, userreq) {
};
module.exports.findAllIdApp = async function (idapp) {
module.exports.findAll = async function () {
const myfind = { active: true };
return Site.find(myfind).lean();
};
module.exports.findAllIdApp = async function (idapp) {
const myfind = { idapp, active: true };
let rec = await Site.findOne(myfind).lean();
if (rec) {
rec.email_pwd = '';
rec.telegram_key = '';
rec.telegram_key_test = '';
return rec;
}
return {};
};