From a2c264a3eab9ef6bf448f7512f1ebce7717245e0 Mon Sep 17 00:00:00 2001 From: Esdras Renan Date: Mon, 10 Nov 2025 03:07:22 -0300 Subject: [PATCH] fix: sanitize report keys before serializing schedule --- src/app/api/reports/schedules/[id]/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/api/reports/schedules/[id]/route.ts b/src/app/api/reports/schedules/[id]/route.ts index bd1d0d1..457a75e 100644 --- a/src/app/api/reports/schedules/[id]/route.ts +++ b/src/app/api/reports/schedules/[id]/route.ts @@ -136,7 +136,7 @@ export async function PATCH(request: NextRequest, ctx: Ctx) { item: serializeSchedule( { ...updated, - reportKeys: (updated.reportKeys as string[] | null) ?? [], + reportKeys: sanitizeReportKeys((updated.reportKeys as string[] | null) ?? []), recipients: (updated.recipients as string[] | null) ?? [], }, []