Enforce serverside check of specified punishment type

This commit is contained in:
2025-08-07 03:35:41 -04:00
parent 41f361fcf1
commit 85871fc90a

View File

@ -45,6 +45,9 @@ export async function onRequestPost(context: RequestContext) {
if (!precheckData.can_appeal)
return jsonError(precheckData.reason as string, 400);
if (!precheckData.types?.includes(type))
return jsonError("Specified punishment type is not applicable", 400);
const appealId = `${id}${
context.request.headers.get("cf-ray")?.split("-")[0]
}${Date.now()}`;