diff --git a/backend/seed.js b/backend/seed.js index 3593247..041aee8 100644 --- a/backend/seed.js +++ b/backend/seed.js @@ -4,9 +4,9 @@ const bcrypt = require('bcrypt'); const prisma = new PrismaClient(); async function main() { - const existing = await prisma.user.findUnique({ where: { email: 'admin@wraith.local' } }); - if (existing) { - console.log('Seed: admin user already exists, skipping'); + const userCount = await prisma.user.count(); + if (userCount > 0) { + console.log('Seed: users already exist, skipping'); return; } const hash = await bcrypt.hash('wraith', 10);