Website Summary Files Commits Branches @commit @diff @stats
path: root / src / DevHive.Services / Services / UserService.cs
diff options
context:
space:
mode:
Commit5a62952229d784bab73260c6ff76b8d25500bbb4 (patch)
Author
 transtrike <transtrike@gmail.com>
2021-01-14 09:40:55 +0200
Committer
 transtrike <transtrike@gmail.com>
2021-01-14 09:40:55 +0200
Filesbcee673bfed07d12caeeb00b22a873a55a93a373 /src/DevHive.Services/Services/UserService.cs
DevHive-5a62952229d784bab73260c6ff76b8d25500bbb4.tar
DevHive-5a62952229d784bab73260c6ff76b8d25500bbb4.tar.gz
DevHive-5a62952229d784bab73260c6ff76b8d25500bbb4.zip
Parentfac00296772803663f76fe89d68bee3d1b406078 (diff)
Renamed async methods to include Async in the name in UserRepository
1 files changed, 2 insertions, 2 deletions
-rw-r--r--src/DevHive.Services/Services/UserService.cs4
diff --git a/src/DevHive.Services/Services/UserService.cs b/src/DevHive.Services/Services/UserService.cs
index 012ec1b..44cb0e2 100644
--- a/src/DevHive.Services/Services/UserService.cs
+++ b/src/DevHive.Services/Services/UserService.cs
@@ -50,7 +50,7 @@ namespace DevHive.Services.Services
if (!await this._userRepository.DoesUsernameExistAsync(loginModel.UserName))
throw new ArgumentException("Invalid username!");
- User user = await this._userRepository.GetByUsername(loginModel.UserName);
+ User user = await this._userRepository.GetByUsernameAsync(loginModel.UserName);
if (user.PasswordHash != GeneratePasswordHash(loginModel.Password))
throw new ArgumentException("Incorrect password!");
@@ -276,7 +276,7 @@ namespace DevHive.Services.Services
string jwtUserName = this.GetClaimTypeValues("unique_name", jwt.Claims)[0];
List<string> jwtRoleNames = this.GetClaimTypeValues("role", jwt.Claims);
- User user = await this._userRepository.GetByUsername(jwtUserName)
+ User user = await this._userRepository.GetByUsernameAsync(jwtUserName)
?? throw new ArgumentException("User does not exist!");
/* Username check, only when user isn't admin */