Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
🐛 openapi (#622)
Thibault Le Ouay0da65e4c6c64
diff --git a/apps/server/src/v1/incidents.ts b/apps/server/src/v1/incidents.tsindex 656aefc11..7c4041fe8 100644--- a/apps/server/src/v1/incidents.ts+++ b/apps/server/src/v1/incidents.ts@@ -28,7 +28,12 @@ const IncidentSchema = z.object({example: 1,}),startedAt: z- .preprocess((val) => new Date(String(val)).toISOString(), z.string())+ .preprocess((val) => {+ if (val) {+ return new Date(String(val)).toISOString();+ }+ return new Date().toISOString();+ }, z.string()).openapi({description: "The date the incident started",}),@@ -42,7 +47,12 @@ const IncidentSchema = z.object({.nullable(),acknowledgedAt: z- .preprocess((val) => new Date(String(val)).toISOString(), z.string())+ .preprocess((val) => {+ if (val) {+ return new Date(String(val)).toISOString();+ }+ return new Date().toISOString();+ }, z.string()).openapi({description: "The date the incident was acknowledged",})@@ -57,7 +67,12 @@ const IncidentSchema = z.object({.nullable(),resolvedAt: z- .preprocess((val) => String(val), z.string())+ .preprocess((val) => {+ if (val) {+ return new Date(String(val)).toISOString();+ }+ return new Date().toISOString();+ }, z.string()).openapi({description: "The date the incident was resolved",})