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,
|
(document.getElementById("reductPercentage") as HTMLInputElement).value,
|
||||||
);
|
);
|
||||||
|
|
||||||
const actionResponse = await fetch(`/api/game-appeals/${props.roblox_id}`, {
|
const actionResponse = await fetch(
|
||||||
body: JSON.stringify({
|
`/api/game-appeals/${props.id}/${action}`,
|
||||||
statsReduction: isNaN(statsReduction) ? 0 : statsReduction,
|
{
|
||||||
}),
|
body: JSON.stringify({
|
||||||
headers: {
|
statsReduction: isNaN(statsReduction) ? 0 : statsReduction,
|
||||||
"content-type": "application/json",
|
}),
|
||||||
|
headers: {
|
||||||
|
"content-type": "application/json",
|
||||||
|
},
|
||||||
|
method: "POST",
|
||||||
},
|
},
|
||||||
method: "POST",
|
);
|
||||||
});
|
|
||||||
|
|
||||||
useToast()(
|
useToast()(
|
||||||
actionResponse.ok
|
actionResponse.ok
|
||||||
|
@ -50,6 +50,7 @@ export async function onRequestPost(context: RequestContext) {
|
|||||||
await context.env.DATA.put(
|
await context.env.DATA.put(
|
||||||
`gameappeal_${appealId}`,
|
`gameappeal_${appealId}`,
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
|
id: appealId,
|
||||||
reasonForUnban,
|
reasonForUnban,
|
||||||
roblox_id: id,
|
roblox_id: id,
|
||||||
roblox_username: username,
|
roblox_username: username,
|
||||||
|
1
index.d.ts
vendored
1
index.d.ts
vendored
@ -36,6 +36,7 @@ declare global {
|
|||||||
|
|
||||||
interface GameAppealProps {
|
interface GameAppealProps {
|
||||||
created_at: number;
|
created_at: number;
|
||||||
|
id: string;
|
||||||
reasonForUnban: string;
|
reasonForUnban: string;
|
||||||
roblox_id: number;
|
roblox_id: number;
|
||||||
roblox_username: string;
|
roblox_username: string;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user