Skip to content

Commit 0ede0a1

Browse files
committed
fix: create report date issue
1 parent 4dd7a39 commit 0ede0a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: apps/server/src/v1/statusReport.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ statusReportApi.openapi(postRoute, async (c) => {
309309
const input = c.req.valid("json");
310310
const workspaceId = Number(c.get("workspaceId"));
311311

312-
const { pages_id, monitors_id } = input;
312+
const { pages_id, monitors_id, date } = input;
313313

314314
if (monitors_id.length) {
315315
const monitors = (
@@ -370,7 +370,7 @@ statusReportApi.openapi(postRoute, async (c) => {
370370
.insert(statusReportUpdate)
371371
.values({
372372
...input,
373-
date: new Date(input.date),
373+
date: date ? new Date(date) : new Date(),
374374
statusReportId: _newStatusReport.id,
375375
})
376376
.returning()

0 commit comments

Comments
 (0)