Move to V2 datastore apis
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user