- aggiornamento con proj RISO. postcss, pwa.

This commit is contained in:
Surya Paolo
2025-03-05 18:14:09 +01:00
parent f3597facd3
commit f6d8e1bb0b
5 changed files with 31 additions and 16 deletions

View File

@@ -731,7 +731,7 @@ UserSchema.statics.isFacilitatore = function (perm) {
}
};
UserSchema.statics.findByToken = async function (token, typeaccess, con_auth) {
UserSchema.statics.findByToken = async function (token, typeaccess, con_auth, idapp) {
const User = this;
let decoded;
let code = server_constants.RIS_CODE_HTTP_INVALID_TOKEN;
@@ -758,10 +758,15 @@ UserSchema.statics.findByToken = async function (token, typeaccess, con_auth) {
}
if (code === server_constants.RIS_CODE_OK) {
user = await User.findOne({
'_id': decoded.smart,
'tokens.token': token,
'tokens.access': typeaccess,
tokens: {
$elemMatch: {
token: token,
access: typeaccess,
},
},
});
if (user) {