Fix first setup server error handling
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import { redirect } from "next/navigation";
|
||||
import { unstable_noStore as noStore } from "next/cache";
|
||||
import { prisma } from "./prisma";
|
||||
|
||||
export async function hasAdminUser() {
|
||||
noStore();
|
||||
try {
|
||||
const admin = await prisma.userRole.findFirst({
|
||||
where: { role: { name: "admin" } },
|
||||
|
||||
Reference in New Issue
Block a user