My-Weekly-ToDo-List/scripts/create-test-user.ts
mARTin d92a8c7210 feat: add task actions (notes/delete) and refine animation logic
- Added 'onDelete' and 'onNotes' support to TaskItem.
- Implemented hover actions (Delete and Notes icons) for tasks.
- Added Notes Modal for editing task markdown content.
- Simplified navigation animation to remove blank flash (single-phase slide-in).
- Fixed syntax error in updateTask function.
- Updated styles for modal and task actions.
2026-02-01 12:25:53 +01:00

45 lines
1.1 KiB
TypeScript

import { PrismaClient } from '@prisma/client';
import { hash } from 'bcryptjs';
const prisma = new PrismaClient();
async function createTestUser() {
try {
const email = 'test@martin-bierschenk.de';
const password = 'Test2026';
// Check if user exists
const existing = await prisma.user.findUnique({
where: { email }
});
if (existing) {
console.log('User already exists:', email);
return;
}
// Hash password
const passwordHash = await hash(password, 12);
// Create user
const user = await prisma.user.create({
data: {
email,
passwordHash,
emailVerified: new Date(),
}
});
console.log('✅ User created successfully!');
console.log('Email:', email);
console.log('Password:', password);
console.log('User ID:', user.id);
} catch (error) {
console.error('Error creating user:', error);
} finally {
await prisma.$disconnect();
}
}
createTestUser();