Make game appeal actions ACTUALLY work now

This commit is contained in:
2023-10-19 16:51:16 -04:00
parent 733d74824d
commit 8778547286
3 changed files with 13 additions and 8 deletions

View File

@ -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