fix: admin invitation w/ system user

This commit is contained in:
DecDuck
2024-11-16 17:03:04 +11:00
parent 2859005ad4
commit 8463e35a10

View File

@ -1,7 +1,9 @@
import prisma from "../internal/db/database";
export default defineNitroPlugin(async (nitro) => {
const userCount = await prisma.user.count({});
const userCount = await prisma.user.count({
where: { id: { not: "system" } },
});
if (userCount != 0) return;
// This setup runs every time the server sets up,