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]) } })