fix: admin invitation w/ system user
This commit is contained in:
parent
2859005ad4
commit
8463e35a10
1 changed files with 3 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue