aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Services/Services/UserService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/DevHive.Services/Services/UserService.cs')
-rw-r--r--src/DevHive.Services/Services/UserService.cs14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/DevHive.Services/Services/UserService.cs b/src/DevHive.Services/Services/UserService.cs
index b60cc4c..bd9c7c5 100644
--- a/src/DevHive.Services/Services/UserService.cs
+++ b/src/DevHive.Services/Services/UserService.cs
@@ -72,9 +72,13 @@ namespace DevHive.Services.Services
User user = await this._userRepository.GetByIdAsync(id)
?? throw new ArgumentException("User does not exist!");
+<<<<<<< HEAD
+ return this._userMapper.Map<UserServiceModel>(user);
+=======
UserServiceModel model = this._userMapper.Map<UserServiceModel>(user);
return model;
+>>>>>>> d104a6810dcca58e7003833e5b7c74a7722df879
}
public async Task<UserServiceModel> UpdateUser(UpdateUserServiceModel updateModel)
@@ -107,16 +111,6 @@ namespace DevHive.Services.Services
throw new InvalidOperationException("Unable to delete user!");
}
- public async Task<bool> AddFriend(Guid userId, Guid friendId)
- {
- User user = await this._userRepository.GetByIdAsync(userId);
- User friend = await this._userRepository.GetByIdAsync(friendId);
-
- return user != default(User) && friend != default(User) ?
- await this._userRepository.AddFriend(user, friend) :
- throw new ArgumentException("Invalid user!");
- }
-
private string GeneratePasswordHash(string password)
{
return string.Join(string.Empty, SHA512.HashData(Encoding.ASCII.GetBytes(password)));