- fix: Date problems... (it was a bad "copy" function, the object date was not valid...)
- fix: error fetch on loading... (offline appeared)
This commit is contained in:
@@ -44,7 +44,7 @@ var TodoSchema = new mongoose.Schema({
|
||||
type: Date
|
||||
},
|
||||
expiring_at: {
|
||||
type: Date
|
||||
type: Date,
|
||||
},
|
||||
enableExpiring: {
|
||||
type: Boolean,
|
||||
@@ -83,10 +83,15 @@ TodoSchema.statics.findAllByUserId = function (userId) {
|
||||
};
|
||||
|
||||
TodoSchema.pre('save', function (next) {
|
||||
// var todo = this;
|
||||
|
||||
// console.log('todo.expiring_at', todo.expiring_at);
|
||||
|
||||
next();
|
||||
});
|
||||
|
||||
|
||||
|
||||
var Todo = mongoose.model('Todos', TodoSchema);
|
||||
|
||||
module.exports = { Todo };
|
||||
|
||||
Reference in New Issue
Block a user