Skip to content
Snippets Groups Projects
Commit 76645ffe authored by Gustavo Soviersovski's avatar Gustavo Soviersovski
Browse files

Still Attempting expire token

parent e27ee336
No related branches found
No related tags found
1 merge request!116Release v1.0.0
Pipeline #
......@@ -38,9 +38,9 @@ ResetToken.methods.createResetToken = function (done) {
return done(null, token);
})
}
Token.methods.hasExpired = function () {
ResetToken.methods.hasExpired = function () {
var now = new Date();
return (now - createdAt) > 10/*86400*/; //Token is a day old
return (now - this.createdAt) > 10/*86400*/; //Token is a day old
};
module.exports = mongoose.model('ResetToken', ResetToken);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment