正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
@@ -19,7 +19,7 @@ exports = module.exports = function() { | @@ -19,7 +19,7 @@ exports = module.exports = function() { | ||
19 | 19 | ||
20 | var that = this | 20 | var that = this |
21 | 21 | ||
22 | - that.updated_at = (!that.created_at) ? Date.now() : that._id.getTimestamp() | 22 | + that.updated_at = _.isUndefined(that.created_at) ? that._id.getTimestamp() : new Date(); |
23 | 23 | ||
24 | if (!that.created_at) | 24 | if (!that.created_at) |
25 | that.created_at = that._id.getTimestamp() | 25 | that.created_at = that._id.getTimestamp() |
@@ -37,7 +37,7 @@ exports = module.exports = function() { | @@ -37,7 +37,7 @@ exports = module.exports = function() { | ||
37 | getters: true | 37 | getters: true |
38 | }) | 38 | }) |
39 | 39 | ||
40 | - Schema.plugin(jsonSelect, '-_id -__v') | 40 | + Schema.plugin(jsonSelect, '-_id') |
41 | 41 | ||
42 | return Schema | 42 | return Schema |
43 | 43 |
请
注册
或
登录
后发表评论