analytics page

This commit is contained in:
Michael Freno
2026-01-06 00:40:44 -05:00
parent 61303969e8
commit d2ee61b830
8 changed files with 1012 additions and 4 deletions

View File

@@ -15,9 +15,8 @@ const getPostForEdit = query(async (id: string) => {
const privilegeLevel = await getPrivilegeLevel(event);
const userID = await getUserID(event);
// Return 401 for non-admin users
if (privilegeLevel !== "admin") {
throw new Response("Unauthorized", { status: 401 });
throw redirect("/401");
}
const conn = ConnectionFactory();