analytics page
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user