diff options
Diffstat (limited to 'src/DevHive.Services')
| -rw-r--r-- | src/DevHive.Services/Services/UserService.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/DevHive.Services/Services/UserService.cs b/src/DevHive.Services/Services/UserService.cs index d8c4ee5..b3a4987 100644 --- a/src/DevHive.Services/Services/UserService.cs +++ b/src/DevHive.Services/Services/UserService.cs @@ -90,8 +90,8 @@ namespace DevHive.Services.Services #region Read public async Task<UserServiceModel> GetUserById(Guid id) { - User user = await this._userRepository.GetByIdAsync(id) - ?? throw new ArgumentException("User does not exist!"); + User user = await this._userRepository.GetByIdAsync(id) ?? + throw new ArgumentException("User does not exist!"); return this._userMapper.Map<UserServiceModel>(user); } @@ -121,8 +121,8 @@ namespace DevHive.Services.Services if (!successful) throw new InvalidOperationException("Unable to edit user!"); - return this._userMapper.Map<UserServiceModel>( - await this._userRepository.GetByIdAsync(user.Id)); + User newUser = await this._userRepository.GetByIdAsync(user.Id); + return this._userMapper.Map<UserServiceModel>(newUser); } public async Task<ProfilePictureServiceModel> UpdateProfilePicture(UpdateProfilePictureServiceModel updateProfilePictureServiceModel) |
