diff --git a/pages/mod-queue.page.server.tsx b/pages/mod-queue.page.server.tsx index 216ba06..36dcfa3 100644 --- a/pages/mod-queue.page.server.tsx +++ b/pages/mod-queue.page.server.tsx @@ -14,6 +14,13 @@ export async function onBeforeRender(pageContext: PageContext) { gma: [1 << 5], report: [1 << 5], }; + + const typeNames: { [k: string]: string } = { + appeal: "Discord Appeals", + gma: "Game Appeals", + report: "Game Reports", + }; + const { searchParams } = new URL( pageContext.urlOriginal, "http://localhost:8788" @@ -22,13 +29,14 @@ export async function onBeforeRender(pageContext: PageContext) { const allowedTypes = []; for (const [type, ints] of Object.entries(typePermissions)) { - if (ints.find((i) => currentUser.permissions & i)) allowedTypes.push(type); + if (ints.find((i) => currentUser.permissions & i)) + allowedTypes.push({ name: typeNames[type], value: type }); } if (!allowedTypes.length) return { pageContext: { - allowedTypes, + entry_types: [], }, status: 403, }; @@ -40,7 +48,7 @@ export async function onBeforeRender(pageContext: PageContext) { return { pageContext: { pageProps: { - allowedTypes, + entry_types: allowedTypes, }, }, };