From 202e20ddd5a80a238219a287d0606f638dbc3c30 Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Mon, 12 Jan 2026 19:27:46 +0100 Subject: [PATCH] Fix #3 --- backend/src/routes/resources/main.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/backend/src/routes/resources/main.ts b/backend/src/routes/resources/main.ts index 1c65d3d..6b25070 100644 --- a/backend/src/routes/resources/main.ts +++ b/backend/src/routes/resources/main.ts @@ -513,8 +513,17 @@ export default async function resourceRoutes(server: FastifyInstance) { let data = {...body, updated_at: new Date().toISOString(), updated_by: userId} + //@ts-ignore + delete data.updatedBy + //@ts-ignore + delete data.updatedAt + + console.log(data) + Object.keys(data).forEach((key) => { - if(key.includes("_at") || key.includes("At")) { + console.log(key) + + if(key.includes("_at") || key.includes("At") || key.toLowerCase().includes("date")) { data[key] = normalizeDate(data[key]) } })