From bb16a50e6c43bb4003c15c1f458076af79095bcf Mon Sep 17 00:00:00 2001 From: Mark Tapia Date: Thu, 30 Jul 2026 14:44:35 -0700 Subject: [PATCH] fix: evaluate created_at at todo insert time Date.now() was called when the schema loaded, so every todo shared the app-start timestamp. Co-authored-by: Cursor --- app/models/Todo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/Todo.js b/app/models/Todo.js index 4e35390c..3e670f0e 100644 --- a/app/models/Todo.js +++ b/app/models/Todo.js @@ -8,7 +8,7 @@ const TodoSchema = new Schema({ }, created_at: { type: Date, - default: Date.now() + default: Date.now } });