diff --git a/components/NewGameBan.tsx b/components/NewGameBan.tsx index 34e3128..c17aad0 100644 --- a/components/NewGameBan.tsx +++ b/components/NewGameBan.tsx @@ -152,6 +152,24 @@ export default function (props: { isOpen: boolean; onClose: () => void }) { }, method: "PUT", }); + + if (!fileUpload.ok) { + await fetch("/api/reports/recall", { + body: JSON.stringify({ id }), + headers: { + "content-type": "application/json", + }, + method: "POST", + }); + + useToast()({ + description: "Failed to upload file", + status: "error", + title: "Error", + }); + + return; + } } return (