We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4dd7a39 commit 0ede0a1Copy full SHA for 0ede0a1
apps/server/src/v1/statusReport.ts
@@ -309,7 +309,7 @@ statusReportApi.openapi(postRoute, async (c) => {
309
const input = c.req.valid("json");
310
const workspaceId = Number(c.get("workspaceId"));
311
312
- const { pages_id, monitors_id } = input;
+ const { pages_id, monitors_id, date } = input;
313
314
if (monitors_id.length) {
315
const monitors = (
@@ -370,7 +370,7 @@ statusReportApi.openapi(postRoute, async (c) => {
370
.insert(statusReportUpdate)
371
.values({
372
...input,
373
- date: new Date(input.date),
+ date: date ? new Date(date) : new Date(),
374
statusReportId: _newStatusReport.id,
375
})
376
.returning()
0 commit comments