mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-09 20:12:10 +10:00
fix: admin invitation w/ system user
This commit is contained in:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user