Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
fix issue (#1798)
Thibault Le Ouay4244aeae00c5
diff --git a/apps/server/src/routes/rpc/services/status-report/__tests__/status-report.test.ts b/apps/server/src/routes/rpc/services/status-report/__tests__/status-report.test.tsindex ea7301924..51113cd8d 100644--- a/apps/server/src/routes/rpc/services/status-report/__tests__/status-report.test.ts+++ b/apps/server/src/routes/rpc/services/status-report/__tests__/status-report.test.ts@@ -447,15 +447,15 @@ describe("StatusReportService.CreateStatusReport", () => {.where(eq(statusReport.id, Number(data.statusReport.id)));});- test("sets pageId to null when no components provided", async () => {+ test("preserves pageId when no components provided", async () => {const res = await connectRequest("CreateStatusReport",{title: `${TEST_PREFIX}-null-pageid`,status: "STATUS_REPORT_STATUS_INVESTIGATING",- message: "Test null pageId when no components.",+ message: "Test pageId preserved when no components.",date: new Date().toISOString(),- pageId: "1", // This should be ignored+ pageId: "1",pageComponentIds: [],},{ "x-openstatus-key": "1" },@@ -466,13 +466,13 @@ describe("StatusReportService.CreateStatusReport", () => {const data = await res.json();expect(data).toHaveProperty("statusReport");- // Verify the pageId is null+ // Verify the pageId is preserved from the requestconst createdReport = await db.select().from(statusReport).where(eq(statusReport.id, Number(data.statusReport.id))).get();- expect(createdReport?.pageId).toBeNull();+ expect(createdReport?.pageId).toBe(1);// Clean upawait dbdiff --git a/apps/server/src/routes/rpc/services/status-report/index.ts b/apps/server/src/routes/rpc/services/status-report/index.tsindex 53107d622..841306fd6 100644--- a/apps/server/src/routes/rpc/services/status-report/index.ts+++ b/apps/server/src/routes/rpc/services/status-report/index.ts@@ -297,7 +297,7 @@ export const statusReportServiceImpl: ServiceImpl<typeof StatusReportService> =}// Use the derived pageId from components (null if no components)- const pageId = derivedPageId;+ const pageId = Number(providedPageId);// Create the status reportconst report = await tx