Start inserting game mod logs into D1
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
import { insertLogs } from "../../../gcloud.js";
|
||||
import { getBanList, setBanList } from "../../../roblox-open-cloud.js";
|
||||
import { jsonError } from "../../../common.js";
|
||||
|
||||
@ -35,11 +34,19 @@ export async function onRequestPost(context: RequestContext) {
|
||||
UnbanReduct: statsReduction,
|
||||
};
|
||||
|
||||
await insertLogs(
|
||||
{ [data.roblox_id]: 4 },
|
||||
context.params.id as string,
|
||||
context,
|
||||
);
|
||||
await context.env.D1.prepare(
|
||||
"INSERT INTO game_mod_logs (action, evidence, executed_at, executor, id, target) VALUES (?, ?, ?, ?, ?, ?);",
|
||||
)
|
||||
.bind(
|
||||
"accept_appeal",
|
||||
`https://carcrushers.cc/mod-queue?id=${context.params.id}&type=gma`,
|
||||
Date.now(),
|
||||
context.data.current_user.id,
|
||||
crypto.randomUUID(),
|
||||
data.roblox_id,
|
||||
)
|
||||
.run();
|
||||
|
||||
await setBanList(context, banList);
|
||||
|
||||
return new Response(null, {
|
||||
|
Reference in New Issue
Block a user