From bce76440d537855ad486869d5b7bbc0e3adc8a45 Mon Sep 17 00:00:00 2001 From: Danail Dimitrov Date: Thu, 4 Feb 2021 19:50:26 +0200 Subject: Adding CommentController tests --- src/DevHive.Services/Services/CommentService.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/DevHive.Services/Services') diff --git a/src/DevHive.Services/Services/CommentService.cs b/src/DevHive.Services/Services/CommentService.cs index 3584e3a..e2b54c4 100644 --- a/src/DevHive.Services/Services/CommentService.cs +++ b/src/DevHive.Services/Services/CommentService.cs @@ -104,8 +104,8 @@ namespace DevHive.Services.Services #region Validations /// - /// Checks whether the user Id in the token and the given user Id match - /// + /// Checks whether the user Id in the token and the given user Id match + /// public async Task ValidateJwtForCreating(Guid userId, string rawTokenData) { User user = await this.GetUserForValidation(rawTokenData); @@ -114,10 +114,10 @@ namespace DevHive.Services.Services } /// - /// Checks whether the comment, gotten with the commentId, + /// Checks whether the comment, gotten with the commentId, /// is made by the user in the token /// or if the user in the token is an admin - /// + /// public async Task ValidateJwtForComment(Guid commentId, string rawTokenData) { Comment comment = await this._commentRepository.GetByIdAsync(commentId) ?? @@ -135,8 +135,8 @@ namespace DevHive.Services.Services } /// - /// Returns the user, via their Id in the token - /// + /// Returns the user, via their Id in the token + /// private async Task GetUserForValidation(string rawTokenData) { JwtSecurityToken jwt = new JwtSecurityTokenHandler().ReadJwtToken(rawTokenData.Remove(0, 7)); @@ -151,8 +151,8 @@ namespace DevHive.Services.Services } /// - /// Returns all values from a given claim type - /// + /// Returns all values from a given claim type + /// private List GetClaimTypeValues(string type, IEnumerable claims) { List toReturn = new(); -- cgit v1.2.3