From 4dde245c0308c3d43d8c4579c4cc22e57f2e006f Mon Sep 17 00:00:00 2001 From: Benjamin Ramet Date: Wed, 20 Nov 2024 09:39:29 +0100 Subject: [PATCH] Explicitly set startingOn for a post on phaseHistory --- server/controllers/phaseHistory.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/server/controllers/phaseHistory.ts b/server/controllers/phaseHistory.ts index 7a7968f0d..75dd0aef0 100644 --- a/server/controllers/phaseHistory.ts +++ b/server/controllers/phaseHistory.ts @@ -38,6 +38,7 @@ phaseHistoryController.post({ path: '/' }, async (_req, res) => { const phaseHistory = new PhaseHistory(); phaseHistory.village = village; phaseHistory.phase = data.phase; + phaseHistory.startingOn = new Date(); // Save phase history in db const phaseHistoryRepository = AppDataSource.getRepository(PhaseHistory);