fix: Use passwordHash field name (matches Prisma schema)

This commit is contained in:
fullsizemalt 2026-01-12 15:25:44 -08:00
parent 7607dff622
commit 458913bdf8

View file

@ -91,7 +91,7 @@ export const createUser = async (request: FastifyRequest, reply: FastifyReply) =
const user = await request.server.prisma.user.create({
data: {
email: data.email,
password: hashedPassword,
passwordHash: hashedPassword,
name: data.name || data.email.split('@')[0],
role: (data.role as any) || 'WORKER',
...(data.roleId && { roleId: data.roleId }),