Closed matheusdavidson closed 5 years ago
I also have this issue, is there a fix?
Problema ainda acontece. Alguma dica ?
I think problem is still going.
I added to my schema this code.
tokenSchema.plugin(timezone, { paths: ['createdAt', 'updatedAt', 'token.expiresAt'] });
And no response when i run this code
TokenModel.findOne({"token.accessToken":accessToken}).then((instance)=>{
if(instance){
return resolve(instance);
}else{
return reject(new AuthError.UnauthorizedError());
}
}).catch((err)=>{
logger.error(err);
return reject(err);
});
I have pull request about this issue. You guys can check and live for another day :) Check commit
I had to discard your PR since your solution caused another bug.
Should be solved in https://github.com/rodrigogs/mongoose-timezone/releases/tag/v1.2.0
A query that uses req.params stop working after using the plugin, for example:
The above query won't execute nothing, if i comment the plugin:
It works again.
The issue happens only with req.params, if i hardcode the email there it works. I have consoled req.params and it has the email e it is a string.