Create get all appeal bans endpoint

This commit is contained in:
Regalijan 2023-10-30 17:01:08 -04:00
parent 9fe710b32d
commit 5272c777a8
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -0,0 +1,9 @@
import { jsonResponse } from "../../common.js";
export async function onRequestGet(context: RequestContext) {
const { results } = await context.env.D1.prepare(
"SELECT * FROM appeal_bans;",
).all();
return jsonResponse(JSON.stringify(results));
}