diff --git a/backend/src/routes/resources/main.ts b/backend/src/routes/resources/main.ts index 6b25070..2fb0cfc 100644 --- a/backend/src/routes/resources/main.ts +++ b/backend/src/routes/resources/main.ts @@ -461,10 +461,9 @@ export default async function resourceRoutes(server: FastifyInstance) { } Object.keys(createData).forEach((key) => { - if(key.toLowerCase().includes("date")) createData[key] = normalizeDate(createData[key]) + if(key.toLowerCase().includes("date") && key !== "deliveryDateType") createData[key] = normalizeDate(createData[key]) }) - const [created] = await server.db .insert(table) .values(createData)