Make game appeal actions ACTUALLY work now
This commit is contained in:
parent
733d74824d
commit
8778547286
@ -29,15 +29,18 @@ export default function (props: GameAppealProps) {
|
||||
(document.getElementById("reductPercentage") as HTMLInputElement).value,
|
||||
);
|
||||
|
||||
const actionResponse = await fetch(`/api/game-appeals/${props.roblox_id}`, {
|
||||
body: JSON.stringify({
|
||||
statsReduction: isNaN(statsReduction) ? 0 : statsReduction,
|
||||
}),
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
const actionResponse = await fetch(
|
||||
`/api/game-appeals/${props.id}/${action}`,
|
||||
{
|
||||
body: JSON.stringify({
|
||||
statsReduction: isNaN(statsReduction) ? 0 : statsReduction,
|
||||
}),
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
},
|
||||
method: "POST",
|
||||
},
|
||||
method: "POST",
|
||||
});
|
||||
);
|
||||
|
||||
useToast()(
|
||||
actionResponse.ok
|
||||
|
@ -50,6 +50,7 @@ export async function onRequestPost(context: RequestContext) {
|
||||
await context.env.DATA.put(
|
||||
`gameappeal_${appealId}`,
|
||||
JSON.stringify({
|
||||
id: appealId,
|
||||
reasonForUnban,
|
||||
roblox_id: id,
|
||||
roblox_username: username,
|
||||
|
1
index.d.ts
vendored
1
index.d.ts
vendored
@ -36,6 +36,7 @@ declare global {
|
||||
|
||||
interface GameAppealProps {
|
||||
created_at: number;
|
||||
id: string;
|
||||
reasonForUnban: string;
|
||||
roblox_id: number;
|
||||
roblox_username: string;
|
||||
|
Loading…
x
Reference in New Issue
Block a user