Finalizing display issues for news release

This commit is contained in:
Nathan Leniz
2015-03-08 16:50:51 +09:00
parent bac22c1d96
commit f367a0310e
10 changed files with 156 additions and 67 deletions

View File

@@ -29,4 +29,11 @@ var commentSchema = new mongoose.Schema({
}
});
module.exports = mongoose.model('Comment', commentSchema);
module.exports = mongoose.model('Comment', commentSchema);
/*
author: {
type: mongoose.Schema.Types.ObjectId,
ref: 'User'
},
*/

View File

@@ -41,5 +41,18 @@ var storySchema = new mongoose.Schema({
}
});
storySchema.pre('save', function(next) {
console.log('pre save test');
next();
});
module.exports = mongoose.model('Story', storySchema);
/*
author: {
userId: {
type: mongoose.Schema.Types.ObjectId,
ref: 'User'
}
},
*/