diff --git a/models/User.js b/models/User.js index 2c98cce012..1ea1ab6653 100644 --- a/models/User.js +++ b/models/User.js @@ -2,12 +2,12 @@ var mongoose = require('mongoose'), bcrypt = require('bcrypt'); var userSchema = new mongoose.Schema({ - email: { type: String, unique: true }, - admin: { type: Boolean, default: false }, - firstName: String, - lastName: String, + username: { type: String, unique: true }, + email: String, + name: String, password: String, tokens: { + google: String, facebook: String, foursquare: String, twitter: String, @@ -15,7 +15,8 @@ var userSchema = new mongoose.Schema({ }, provider: String, facebook: String, - google: String + google: String, + isAdmin: Boolean, }); userSchema.path('password').validate(function(password) { @@ -62,4 +63,4 @@ userSchema.methods.comparePassword = function(candidatePassword, cb) { }); }; -module.exports = mongoose.model('User', userSchema); \ No newline at end of file +module.exports = mongoose.model('User', userSchema);