- 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.
45 lines
1.1 KiB
TypeScript
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();
|