From ac53ccbdb76079a6c093d7daef76d8ca35c43075 Mon Sep 17 00:00:00 2001 From: regalijan Date: Thu, 19 Oct 2023 16:49:44 -0400 Subject: [PATCH] Make request to complete endpoint on finish --- components/NewGameBan.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/components/NewGameBan.tsx b/components/NewGameBan.tsx index c17aad0..390eac9 100644 --- a/components/NewGameBan.tsx +++ b/components/NewGameBan.tsx @@ -170,6 +170,20 @@ export default function (props: { isOpen: boolean; onClose: () => void }) { return; } + + await fetch("/api/reports/complete", { + body: JSON.stringify({ id }), + headers: { + "content-type": "application/json", + }, + method: "POST", + }); + + useToast()({ + description: "User moderated", + status: "success", + title: "Success", + }); } return (