24 lines
673 B
TypeScript
24 lines
673 B
TypeScript
export async function onRequestGet(context: RequestContext) {
|
|
const { searchParams } = new URL(context.request.url);
|
|
const entryType = searchParams.get("type") ?? "all";
|
|
const showClosed = searchParams.get("showClosed") === "true";
|
|
const items: { type: string; data: { [k: string]: any } }[] = [];
|
|
const types = {
|
|
appeal: `appeal_`,
|
|
gma: `gameappeal_`,
|
|
report: `report_`,
|
|
};
|
|
const permissions = {
|
|
appeal: [1 << 0, 1 << 1],
|
|
gma: [1 << 5],
|
|
report: [1 << 5],
|
|
};
|
|
const { current_user: currentUser } = context.data;
|
|
|
|
return new Response(JSON.stringify(items), {
|
|
headers: {
|
|
"content-type": "application/json",
|
|
},
|
|
});
|
|
}
|