making so schema changes to users -- adding is_imperial and favorites list

This commit is contained in:
2013-01-23 10:26:28 -05:00
parent 268ceedc7e
commit eb4ed9b84b

View File

@@ -4,7 +4,9 @@ var UserSchema = new mongoose.Schema({
username: {type: String, unique: true, required: true},
name: String,
password: String,
is_admin: {type: Boolean, 'default': false }
is_admin: {type: Boolean, 'default': false },
is_imperial: {type: Boolean, 'default': false },
favorites: [{type: [Schema.ObjectId], ref: 'Exercise'}]
});
UserSchema.methods.recentworkouts = function(callback) {