Backend is here. Default admin is created if needed.
This commit is contained in:
13
admin_check.js
Normal file
13
admin_check.js
Normal file
@@ -0,0 +1,13 @@
|
||||
// Simple script to check for admin user
|
||||
const { PrismaClient } = require('@prisma/client');
|
||||
(async () => {
|
||||
const prisma = new PrismaClient();
|
||||
try {
|
||||
const admin = await prisma.user.findFirst({ where: { role: 'ADMIN' } });
|
||||
console.log('Admin user:', admin);
|
||||
} catch (e) {
|
||||
console.error('Error:', e);
|
||||
} finally {
|
||||
await prisma.$disconnect();
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user