- sistemazioni Email : registrazione, invio invito, email di benvenuto
- fix circuito - profilo
This commit is contained in:
@@ -42,9 +42,9 @@ const authenticateMiddleware = async (req, res, next, withUser = false, lean = f
|
||||
req.statuscode2 = null;
|
||||
|
||||
// Gestione token scaduto
|
||||
if (user.code === server_constants.RIS_CODE_HTTP_FORBIDDEN_TOKEN_EXPIRED) {
|
||||
if (user.code === server_constants.RIS_CODE_HTTP_TOKEN_EXPIRED) {
|
||||
return handleAuthFailure(req, res, next, {
|
||||
code: server_constants.RIS_CODE_HTTP_FORBIDDEN_TOKEN_EXPIRED,
|
||||
code: server_constants.RIS_CODE_HTTP_TOKEN_EXPIRED,
|
||||
message: 'TOKEN SCADUTO',
|
||||
logPrefix,
|
||||
noError,
|
||||
@@ -81,7 +81,7 @@ function handleAuthFailure(req, res, next, { code, message, logPrefix, noError }
|
||||
|
||||
if (noError) {
|
||||
req.statuscode2 = code;
|
||||
console.log(` ## ${logPrefix} - ${message} (noError mode, continuing) ⚠️`);
|
||||
// console.log(` ## ${logPrefix} - ${message} (noError mode, continuing) ⚠️`);
|
||||
return next();
|
||||
} else {
|
||||
console.log(` ## SEND RES ${logPrefix} - ${message} ❌`);
|
||||
|
||||
Reference in New Issue
Block a user