Fixes

parent ae4f3b74
......@@ -4,7 +4,7 @@
var mongoose = require('mongoose');
var RefreshTokenSchema = new mongoose.Schema({
var CodeSchema = new mongoose.Schema({
code: {
type: String,
unique: true,
......@@ -36,6 +36,6 @@ var RefreshTokenSchema = new mongoose.Schema({
}
});
var RefreshToken = mongoose.model('RefreshToken', RefreshTokenSchema);
var Code = mongoose.model('Code', CodeSchema);
module.exports = RefreshToken;
\ No newline at end of file
module.exports = Code;
\ No newline at end of file
......@@ -17,7 +17,7 @@ var isValidPassword = function(candidatePassword, callback) {
});
};
module.exports.hashPassword = function(next) {
var hashPassword = function(next) {
var user = this;
if (!user.isModified('password')) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment