temporary fix for build and remove previous auth related code

This commit is contained in:
2025-04-10 22:39:38 +05:00
parent 7e49bf119a
commit e8296ae3f6
10 changed files with 854 additions and 800 deletions

View File

@ -1,14 +0,0 @@
"use server";
import { auth } from "@/app/auth";
import { headers } from "next/headers";
import { redirect } from "next/navigation";
export async function AdminAuthGuard() {
const session = await auth.api.getSession({
headers: await headers(),
});
if (session?.user.role !== "ADMIN") {
return redirect("/login");
}
return true;
}