From 1dcaf3659aab6aee3f3f023d985614ad40b2d47c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=AF=8C=E4=B8=9C?= Date: Sat, 9 Dec 2023 16:28:10 +0800 Subject: [PATCH] Update Todo.js Use the `now` function instead of a time when the system boot up. --- app/models/Todo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/Todo.js b/app/models/Todo.js index 4e35390..c633262 100644 --- a/app/models/Todo.js +++ b/app/models/Todo.js @@ -8,8 +8,8 @@ const TodoSchema = new Schema({ }, created_at: { type: Date, - default: Date.now() + default: Date.now, } }); -module.exports = Todo = mongoose.model('todos', TodoSchema); \ No newline at end of file +module.exports = Todo = mongoose.model('todos', TodoSchema);