Backend is here. Default admin is created if needed.

This commit is contained in:
aodulov
2025-11-19 10:48:37 +02:00
parent 10819cc6f5
commit bb705c8a63
25 changed files with 3662 additions and 944 deletions

13
admin_check.js Normal file
View 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();
}
})();