Subscribe to comments

This commit is contained in:
Chi Vinh Le
2017-06-05 20:51:08 +07:00
parent 3c96b7eb1e
commit 6b0cdae183
18 changed files with 418 additions and 217 deletions
+4 -1
View File
@@ -104,7 +104,10 @@ const CommentSchema = new Schema({
timestamps: {
createdAt: 'created_at',
updatedAt: 'updated_at'
}
},
toJSON: {
virtuals: true,
},
});
CommentSchema.virtual('edited').get(function() {