Add auth check to game appeal metadata endpoint
This commit is contained in:
parent
f135368dc4
commit
f51742e64d
@ -2,6 +2,12 @@ import { jsonError, jsonResponse } from "../../common.js";
|
||||
import precheck from "./precheck.js";
|
||||
|
||||
export async function onRequestPost(context: RequestContext) {
|
||||
if (
|
||||
context.request.headers.get("authorization") !==
|
||||
`Bearer ${context.env.ROBLOX_APPEALS_TOKEN}`
|
||||
)
|
||||
return jsonError("Unauthorized", 401);
|
||||
|
||||
const { id }: { id: any } = context.data.body;
|
||||
|
||||
if (typeof id !== "number") return jsonError("Invalid user id", 400);
|
||||
|
Loading…
x
Reference in New Issue
Block a user