14 lines
313 B
TypeScript
14 lines
313 B
TypeScript
import { jsonError } from "../../common.js";
|
|
|
|
export async function onRequestPost(context: RequestContext) {
|
|
const { user } = context.data.body;
|
|
|
|
if (!user) return jsonError("No user provided", 400);
|
|
|
|
await context.env.DATA.delete(`gamemod_${user}`);
|
|
|
|
return new Response(null, {
|
|
status: 204,
|
|
});
|
|
}
|