diff --git a/functions/api/reports/[id]/action.ts b/functions/api/reports/[id]/action.ts index ad96ea7..8f5d21a 100644 --- a/functions/api/reports/[id]/action.ts +++ b/functions/api/reports/[id]/action.ts @@ -72,6 +72,12 @@ export async function onRequestPost(context: RequestContext) { Object.assign(banList, newActions); await setBanList(context, banList); + reportData.open = false; + await context.env.DATA.put(`report_${reportId}`, JSON.stringify(reportData)); + await context.env.D1.prepare("UPDATE reports SET open = 0 WHERE id = ?;") + .bind(reportId) + .run(); + return new Response(null, { status: 204, });