Fix game ban modal
This commit is contained in:
parent
108d15d1fe
commit
3d7cb08114
@ -91,13 +91,16 @@ export default function (props: { isOpen: boolean; onClose: () => void }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const [evidence] = files;
|
const [evidence] = files;
|
||||||
|
const fileList: { name: string; size: number }[] = [];
|
||||||
|
|
||||||
|
for (const file of files) {
|
||||||
|
fileList.push({ name: file.name, size: file.size });
|
||||||
|
}
|
||||||
|
|
||||||
const submitReq = await fetch("/api/reports/submit", {
|
const submitReq = await fetch("/api/reports/submit", {
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
actions,
|
actions,
|
||||||
bypass: true,
|
files: fileList,
|
||||||
filename: evidence.name,
|
|
||||||
filesize: evidence.size,
|
|
||||||
usernames,
|
usernames,
|
||||||
}),
|
}),
|
||||||
headers: {
|
headers: {
|
||||||
@ -158,6 +161,14 @@ export default function (props: { isOpen: boolean; onClose: () => void }) {
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await fetch(`/api/reports/${id}/action`, {
|
||||||
|
body: JSON.stringify(actionMap),
|
||||||
|
headers: {
|
||||||
|
"content-type": "application/json",
|
||||||
|
},
|
||||||
|
method: "POST",
|
||||||
|
});
|
||||||
|
|
||||||
toast({
|
toast({
|
||||||
description: "User moderated",
|
description: "User moderated",
|
||||||
status: "success",
|
status: "success",
|
||||||
@ -225,7 +236,7 @@ export default function (props: { isOpen: boolean; onClose: () => void }) {
|
|||||||
<RadioGroup
|
<RadioGroup
|
||||||
onChange={(val) => (actionMap[user] = parseInt(val))}
|
onChange={(val) => (actionMap[user] = parseInt(val))}
|
||||||
>
|
>
|
||||||
<VStack>
|
<VStack alignItems="flex-start">
|
||||||
<Radio value="0">Do Nothing</Radio>
|
<Radio value="0">Do Nothing</Radio>
|
||||||
<Radio value="1">Hide from Leaderboards</Radio>
|
<Radio value="1">Hide from Leaderboards</Radio>
|
||||||
<Radio value="2">Ban</Radio>
|
<Radio value="2">Ban</Radio>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user