diff options
Diffstat (limited to 'server/controllers/users.controller.ts')
-rw-r--r-- | server/controllers/users.controller.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/controllers/users.controller.ts b/server/controllers/users.controller.ts index fda71b3..b06a8fd 100644 --- a/server/controllers/users.controller.ts +++ b/server/controllers/users.controller.ts @@ -43,7 +43,8 @@ export class UsersController { async create(@Body() userPayload: CreateUserDto, @Res({ passthrough: true }) res: Response) { const newUser = new User(); newUser.email = userPayload.email; - newUser.name = userPayload.name; + newUser.firstName = userPayload.firstName; + newUser.lastName = userPayload.lastName; newUser.passwordHash = await bcrypt.hash(userPayload.password, 10); const [role] = await this.rolesService.findByKey(RoleKey.USER); const userRole = new UserRole(); |