fix: Use passwordHash field name (matches Prisma schema)
This commit is contained in:
parent
7607dff622
commit
458913bdf8
1 changed files with 1 additions and 1 deletions
|
|
@ -91,7 +91,7 @@ export const createUser = async (request: FastifyRequest, reply: FastifyReply) =
|
||||||
const user = await request.server.prisma.user.create({
|
const user = await request.server.prisma.user.create({
|
||||||
data: {
|
data: {
|
||||||
email: data.email,
|
email: data.email,
|
||||||
password: hashedPassword,
|
passwordHash: hashedPassword,
|
||||||
name: data.name || data.email.split('@')[0],
|
name: data.name || data.email.split('@')[0],
|
||||||
role: (data.role as any) || 'WORKER',
|
role: (data.role as any) || 'WORKER',
|
||||||
...(data.roleId && { roleId: data.roleId }),
|
...(data.roleId && { roleId: data.roleId }),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue