Fix first setup server error handling
All checks were successful
Release Dry Run / release-dry-run (push) Successful in 1m30s
Template Compliance / compliance (push) Successful in 5s
Build / build (push) Successful in 11m24s

This commit is contained in:
MrSphay
2026-05-15 18:20:01 +02:00
parent 9ac6c87d08
commit 2f0b54b94e
10 changed files with 53 additions and 3 deletions

View File

@@ -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" } },