fix: Use valid RoleEnum value STAFF (not WORKER)
This commit is contained in:
parent
555a22b846
commit
f2dc7526e7
1 changed files with 1 additions and 1 deletions
|
|
@ -93,7 +93,7 @@ export const createUser = async (request: FastifyRequest, reply: FastifyReply) =
|
||||||
email: data.email,
|
email: data.email,
|
||||||
passwordHash: 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) || 'STAFF',
|
||||||
...(data.roleId && { roleId: data.roleId }),
|
...(data.roleId && { roleId: data.roleId }),
|
||||||
...(data.rate !== undefined && { rate: data.rate }),
|
...(data.rate !== undefined && { rate: data.rate }),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue