This commit is contained in:
2013-01-17 23:23:39 -05:00
parent 7b6a0df4a5
commit ae0f4470bf
26 changed files with 211 additions and 198 deletions

View File

@@ -3,7 +3,8 @@ var mongoose = require('mongoose');
var UserSchema = new mongoose.Schema({
username: {type: String, unique: true, required: true},
name: String,
password: String
password: String,
is_admin: {type: Boolean, 'default': false }
});
UserSchema.methods.recentArticles = function(callback) {

View File

@@ -1,24 +0,0 @@
{
"frank": {
"username": "frank",
"name": "Frank Sinatra",
"bio": "Singer",
"password": "password"
},
"jobim": {
"username": "jobim",
"name": "Antonio Carlos Jobim",
"bio": "Composer",
"password": "password"
},
"fred": {
"username": "fred",
"name": "Fred Astaire",
"bio": "Dancer and Actor",
"password": "password"
}
}