Move to V2 datastore apis

This commit is contained in:
2026-03-31 03:24:13 -04:00
parent b69b5cb4eb
commit e3af1e4f37
8 changed files with 36 additions and 53 deletions

View File

@@ -15,15 +15,7 @@ export async function onRequestPost(context: RequestContext) {
if (!appeal) return jsonError("Appeal not found", 400);
const banList = (await getBanList(context)) as {
[k: string]: {
BanType: number;
hidden_from_leaderboards?: boolean;
serverconfigurator_blacklist?: boolean;
Unbanned?: boolean;
UnbanReduct?: number;
};
};
const { etag, path, value: banList } = await getBanList(context);
await context.env.D1.prepare("DELETE FROM game_appeals WHERE id = ?;")
.bind(context.params.id)
@@ -67,7 +59,7 @@ export async function onRequestPost(context: RequestContext) {
)
.run();
await setBanList(context, banList);
await setBanList(context, banList, etag);
return new Response(null, {
status: 204,