fix: sanitize report keys before serializing schedule

This commit is contained in:
Esdras Renan 2025-11-10 03:07:22 -03:00
parent 00c75d14ee
commit a2c264a3ea

View file

@ -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) ?? [],
},
[]