Create GME remove endpoint

This commit is contained in:
regalijan 2023-10-19 16:49:41 -04:00
parent bef8f6f7ea
commit 3ab93c707b
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -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,
});
}