lib/services/forgot_password.js
Function exports
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (app) {
var coll = app.collection({
name: 'ForgotPasswordToken',
fields: {
email: 'email',
Function withToken
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
withToken: function (token) {
return coll.get(token)
.then(function (fpRecord) {
var timestamp = moment(fpRecord.createdAt, moment.ISO_8601)
, weekAgo = moment().add(1, 'weeks');