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');
|
const sendemail = require('../sendemail');
|
||||||
|
|
||||||
|
console.log('createNewRequestPwd');
|
||||||
|
|
||||||
if (code && code.length === 6) {
|
if (code && code.length === 6) {
|
||||||
return User.findByLinkTokenforgotCode(idapp, email, code)
|
return User.findByLinkTokenforgotCode(idapp, email, code)
|
||||||
.then((user) => {
|
.then((user) => {
|
||||||
|
|||||||
@@ -142,6 +142,8 @@ router.post(process.env.LINK_REQUEST_NEWPASSWORD, async (req, res) => {
|
|||||||
const email = body.email.toLowerCase().trim();
|
const email = body.email.toLowerCase().trim();
|
||||||
const codetocheck = body.codetocheck ? body.codetocheck.trim() : '';
|
const codetocheck = body.codetocheck ? body.codetocheck.trim() : '';
|
||||||
|
|
||||||
|
console.log('Request Reset Pwd:', email, ' idapp=', idapp);
|
||||||
|
|
||||||
// Check if too many requests
|
// Check if too many requests
|
||||||
if (await User.tooManyReqPassword(idapp, email, true)) {
|
if (await User.tooManyReqPassword(idapp, email, true)) {
|
||||||
console.log(process.env.LINK_REQUEST_NEWPASSWORD, 'TOO MANY REQUESTS !!! EXIT ', email);
|
console.log(process.env.LINK_REQUEST_NEWPASSWORD, 'TOO MANY REQUESTS !!! EXIT ', email);
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ router.post('/load', authenticate, async (req, res) => {
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
const { SendNotif } = require('../models/sendnotif');
|
const { SendNotif } = require('../models/sendnotif');
|
||||||
|
const { Circuit } = require('../models/circuit');
|
||||||
|
const { Account } = require('../models/account');
|
||||||
|
|
||||||
// Check if ìs a Notif to read
|
// Check if ìs a Notif to read
|
||||||
const idnotif = req.body['idnotif'] ? req.body['idnotif'] : '';
|
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);
|
const whatshow = MyGroup.getWhatToShow(idapp, req.user.username);
|
||||||
let data = await MyGroup.findOne({ idapp, groupname }, whatshow).lean();
|
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 = [];
|
let cities = [];
|
||||||
if (data) {
|
if (data) {
|
||||||
cities = await MyGroup.extractCitiesName(idapp, data._id);
|
cities = await MyGroup.extractCitiesName(idapp, data._id);
|
||||||
|
|||||||
@@ -279,6 +279,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
sendEmail_RequestNewPassword: async function(lang, user, emailto, idapp, tokenforgot, tokenforgot_code) {
|
sendEmail_RequestNewPassword: async function(lang, user, emailto, idapp, tokenforgot, tokenforgot_code) {
|
||||||
|
console.log('sendEmail_RequestNewPassword');
|
||||||
|
|
||||||
let mylocalsconf = {
|
let mylocalsconf = {
|
||||||
idapp,
|
idapp,
|
||||||
|
|||||||
Reference in New Issue
Block a user