This commit is contained in:
2026-01-01 15:59:08 +01:00
parent 82ea760537
commit c9ebec3c2f
3 changed files with 62 additions and 60 deletions

View File

@@ -4,20 +4,22 @@ import * as bcrypt from 'bcryptjs';
const prisma = new PrismaClient();
async function main() {
// Create demo user
const hashedPassword = await bcrypt.hash('demo123', 12);
// Create admin user for newsletter management
const hashedPassword = await bcrypt.hash('Timo.16092005', 12);
const user = await prisma.user.upsert({
where: { email: 'demo@qrmaster.net' },
update: {},
update: {
password: hashedPassword, // Update password if user exists
},
create: {
email: 'demo@qrmaster.net',
name: 'Demo User',
name: 'Admin User',
password: hashedPassword,
},
});
console.log('Created demo user:', user.email);
console.log('Created/Updated admin user:', user.email);
// Create demo QR codes
const qrCodes = [