diff options
| author | transtrike <transtrike@gmail.com> | 2021-01-14 09:40:55 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2021-01-14 09:40:55 +0200 |
| commit | 5a62952229d784bab73260c6ff76b8d25500bbb4 (patch) | |
| tree | bcee673bfed07d12caeeb00b22a873a55a93a373 /src/DevHive.Services/Services/PostService.cs | |
| parent | fac00296772803663f76fe89d68bee3d1b406078 (diff) | |
| download | DevHive-5a62952229d784bab73260c6ff76b8d25500bbb4.tar DevHive-5a62952229d784bab73260c6ff76b8d25500bbb4.tar.gz DevHive-5a62952229d784bab73260c6ff76b8d25500bbb4.zip | |
Renamed async methods to include Async in the name in UserRepository
Diffstat (limited to 'src/DevHive.Services/Services/PostService.cs')
| -rw-r--r-- | src/DevHive.Services/Services/PostService.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/DevHive.Services/Services/PostService.cs b/src/DevHive.Services/Services/PostService.cs index da9e76b..24ca8f3 100644 --- a/src/DevHive.Services/Services/PostService.cs +++ b/src/DevHive.Services/Services/PostService.cs @@ -101,7 +101,7 @@ namespace DevHive.Services.Services return result; } - //Validate + //Validate public async Task<bool> ValidateJwtForComment(Guid commentId, string rawTokenData) { Comment comment = await this._postRepository.GetCommentByIdAsync(commentId); @@ -120,7 +120,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!"); return user; @@ -137,4 +137,4 @@ namespace DevHive.Services.Services return toReturn; } } -}
\ No newline at end of file +} |
