From 9cd66cdcf46119adea96fc8d49502e722a8a98c6 Mon Sep 17 00:00:00 2001
From: regalijan <r@regalijan.com>
Date: Thu, 19 Oct 2023 16:49:12 -0400
Subject: [PATCH] Add types and permissions to mod queue list endpoint

---
 functions/api/mod-queue/list.ts | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/functions/api/mod-queue/list.ts b/functions/api/mod-queue/list.ts
index 6f97295..46acfa5 100644
--- a/functions/api/mod-queue/list.ts
+++ b/functions/api/mod-queue/list.ts
@@ -3,6 +3,17 @@ export async function onRequestGet(context: RequestContext) {
   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: {