Pagina "Attività" non compare bene la scritta Beni e Servizi... ?!
This commit is contained in:
@@ -1204,6 +1204,8 @@ UserSchema.statics.createNewRequestPwd = function (idapp, email, code) {
|
||||
|
||||
const sendemail = require('../sendemail');
|
||||
|
||||
console.log('createNewRequestPwd');
|
||||
|
||||
if (code && code.length === 6) {
|
||||
return User.findByLinkTokenforgotCode(idapp, email, code)
|
||||
.then((user) => {
|
||||
|
||||
@@ -142,6 +142,8 @@ router.post(process.env.LINK_REQUEST_NEWPASSWORD, async (req, res) => {
|
||||
const email = body.email.toLowerCase().trim();
|
||||
const codetocheck = body.codetocheck ? body.codetocheck.trim() : '';
|
||||
|
||||
console.log('Request Reset Pwd:', email, ' idapp=', idapp);
|
||||
|
||||
// Check if too many requests
|
||||
if (await User.tooManyReqPassword(idapp, email, true)) {
|
||||
console.log(process.env.LINK_REQUEST_NEWPASSWORD, 'TOO MANY REQUESTS !!! EXIT ', email);
|
||||
|
||||
@@ -36,6 +36,8 @@ router.post('/load', authenticate, async (req, res) => {
|
||||
try {
|
||||
|
||||
const { SendNotif } = require('../models/sendnotif');
|
||||
const { Circuit } = require('../models/circuit');
|
||||
const { Account } = require('../models/account');
|
||||
|
||||
// Check if ìs a Notif to read
|
||||
const idnotif = req.body['idnotif'] ? req.body['idnotif'] : '';
|
||||
@@ -44,6 +46,23 @@ router.post('/load', authenticate, async (req, res) => {
|
||||
const whatshow = MyGroup.getWhatToShow(idapp, req.user.username);
|
||||
let data = await MyGroup.findOne({ idapp, groupname }, whatshow).lean();
|
||||
|
||||
/*
|
||||
if (data.mycircuits) {
|
||||
for (let i = 0; i < data.mycircuits.length; i++) {
|
||||
const mycirc = await Circuit.findOne({ idapp, name: data.mycircuits[i].circuitname }).lean();
|
||||
data.mycircuits[i] = mycirc;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if (data.mycircuits) {
|
||||
for (let i = 0; i < data.mycircuits.length; i++) {
|
||||
const mycirc = await Circuit.findOne({ idapp, name: data.mycircuits[i].circuitname }).lean();
|
||||
if (mycirc)
|
||||
data.mycircuits[i].account = await Account.getAccountByUsernameAndCircuitId(idapp, '', mycirc._id, true, groupname);
|
||||
}
|
||||
}
|
||||
|
||||
let cities = [];
|
||||
if (data) {
|
||||
cities = await MyGroup.extractCitiesName(idapp, data._id);
|
||||
|
||||
@@ -279,6 +279,7 @@ module.exports = {
|
||||
},
|
||||
|
||||
sendEmail_RequestNewPassword: async function(lang, user, emailto, idapp, tokenforgot, tokenforgot_code) {
|
||||
console.log('sendEmail_RequestNewPassword');
|
||||
|
||||
let mylocalsconf = {
|
||||
idapp,
|
||||
|
||||
Reference in New Issue
Block a user