diff --git a/src/controllers/UserController.ts b/src/controllers/UserController.ts index e4a8e89..560f0c8 100644 --- a/src/controllers/UserController.ts +++ b/src/controllers/UserController.ts @@ -62,7 +62,7 @@ export class UserController { } user = await this.userRepository.save(user) - return new ResponseUser(await this.userRepository.findOne(user, { relations: ['permissions', 'groups'] })); + return new ResponseUser(await this.userRepository.findOne({ id: user.id }, { relations: ['permissions', 'groups'] })); } @Put('/:id')