Skip to content
Permalink
Newer
Older
100644 13 lines (9 sloc) 313 Bytes
October 19, 2023 16:50
1
import { jsonError } from "../../common.js";
2
October 19, 2023 16:49
3
export async function onRequestPost(context: RequestContext) {
4
const { user } = context.data.body;
5
October 19, 2023 16:50
6
if (!user) return jsonError("No user provided", 400);
October 19, 2023 16:49
7
8
await context.env.DATA.delete(`gamemod_${user}`);
9
10
return new Response(null, {
11
status: 204,
12
});
13
}