Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Create GME remove endpoint
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent bef8f6f commit 3ab93c7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions functions/api/gme/remove.ts
@@ -0,0 +1,17 @@
export async function onRequestPost(context: RequestContext) {
const { user } = context.data.body;

if (!user)
return new Response('{"error":"No user provided"}', {
headers: {
"content-type": "application/json",
},
status: 400,
});

await context.env.DATA.delete(`gamemod_${user}`);

return new Response(null, {
status: 204,
});
}

0 comments on commit 3ab93c7

Please sign in to comment.