Browse Source

updated

master
arnaucode 8 years ago
parent
commit
28b8aa896b
2 changed files with 5 additions and 3 deletions
  1. +3
    -1
      controllers/userController.js
  2. +2
    -2
      models/userModel.js

+ 3
- 1
controllers/userController.js

@ -47,7 +47,9 @@ exports.login = function(req, res) {
// find the user
userModel.findOne({
username: req.body.username
}, function(err, user) {
})
.select('+password')
.exec(function(err, user) {
if (err) throw err;

+ 2
- 2
models/userModel.js

@ -6,8 +6,8 @@ var mongooseUniqueValidator = require('mongoose-unique-validator');
var userSchema = new Schema({
username: { type: String, required: true, unique: true },
password: { type: String, required: true, selected: false },
token: { type: String, selected: false },
password: { type: String, required: true, select: false },
token: { type: String, select: false },
description: { type: String, default: "Hello world" },
avatar: { type: String, default: "img/avatars/racoon.png" },
faircoin: { type: String, default: "img/faircoinpublickey_sample.png" },

Loading…
Cancel
Save