aboutsummaryrefslogtreecommitdiff
path: root/src/Services/DevHive.Services
diff options
context:
space:
mode:
Diffstat (limited to 'src/Services/DevHive.Services')
-rw-r--r--src/Services/DevHive.Services/Interfaces/ICommentService.cs2
-rw-r--r--src/Services/DevHive.Services/Interfaces/IRoleService.cs2
-rw-r--r--src/Services/DevHive.Services/Interfaces/IUserService.cs2
-rw-r--r--src/Services/DevHive.Services/Services/CommentService.cs1
-rw-r--r--src/Services/DevHive.Services/Services/FeedService.cs12
-rw-r--r--src/Services/DevHive.Services/Services/RateService.cs2
6 files changed, 10 insertions, 11 deletions
diff --git a/src/Services/DevHive.Services/Interfaces/ICommentService.cs b/src/Services/DevHive.Services/Interfaces/ICommentService.cs
index e7409a8..6d92a5d 100644
--- a/src/Services/DevHive.Services/Interfaces/ICommentService.cs
+++ b/src/Services/DevHive.Services/Interfaces/ICommentService.cs
@@ -6,7 +6,7 @@ namespace DevHive.Services.Interfaces
{
public interface ICommentService
{
- Task<Guid> AddComment(CreateCommentServiceModel createPostServiceModel);
+ Task<Guid> AddComment(CreateCommentServiceModel createCommentServiceModel);
Task<ReadCommentServiceModel> GetCommentById(Guid id);
diff --git a/src/Services/DevHive.Services/Interfaces/IRoleService.cs b/src/Services/DevHive.Services/Interfaces/IRoleService.cs
index 05df917..36e5a01 100644
--- a/src/Services/DevHive.Services/Interfaces/IRoleService.cs
+++ b/src/Services/DevHive.Services/Interfaces/IRoleService.cs
@@ -10,7 +10,7 @@ namespace DevHive.Services.Interfaces
Task<RoleServiceModel> GetRoleById(Guid id);
- Task<bool> UpdateRole(UpdateRoleServiceModel roleServiceModel);
+ Task<bool> UpdateRole(UpdateRoleServiceModel updateRoleServiceModel);
Task<bool> DeleteRole(Guid id);
}
diff --git a/src/Services/DevHive.Services/Interfaces/IUserService.cs b/src/Services/DevHive.Services/Interfaces/IUserService.cs
index daa5e5e..4a9ffc8 100644
--- a/src/Services/DevHive.Services/Interfaces/IUserService.cs
+++ b/src/Services/DevHive.Services/Interfaces/IUserService.cs
@@ -13,7 +13,7 @@ namespace DevHive.Services.Interfaces
Task<UserServiceModel> GetUserByUsername(string username);
Task<UserServiceModel> GetUserById(Guid id);
- Task<UserServiceModel> UpdateUser(UpdateUserServiceModel updateModel);
+ Task<UserServiceModel> UpdateUser(UpdateUserServiceModel updateUserServiceModel);
Task<ProfilePictureServiceModel> UpdateProfilePicture(UpdateProfilePictureServiceModel updateProfilePictureServiceModel);
Task<bool> DeleteUser(Guid id);
diff --git a/src/Services/DevHive.Services/Services/CommentService.cs b/src/Services/DevHive.Services/Services/CommentService.cs
index e14f3bb..b48bac8 100644
--- a/src/Services/DevHive.Services/Services/CommentService.cs
+++ b/src/Services/DevHive.Services/Services/CommentService.cs
@@ -142,7 +142,6 @@ namespace DevHive.Services.Services
JwtSecurityToken jwt = new JwtSecurityTokenHandler().ReadJwtToken(rawTokenData.Remove(0, 7));
Guid jwtUserId = Guid.Parse(this.GetClaimTypeValues("ID", jwt.Claims).First());
- //HashSet<string> jwtRoleNames = this.GetClaimTypeValues("role", jwt.Claims);
User user = await this._userRepository.GetByIdAsync(jwtUserId) ??
throw new ArgumentException("User does not exist!");
diff --git a/src/Services/DevHive.Services/Services/FeedService.cs b/src/Services/DevHive.Services/Services/FeedService.cs
index 17cc43f..c16ffae 100644
--- a/src/Services/DevHive.Services/Services/FeedService.cs
+++ b/src/Services/DevHive.Services/Services/FeedService.cs
@@ -28,14 +28,14 @@ namespace DevHive.Services.Services
/// This method is used in the feed page.
/// See the FeedRepository "GetFriendsPosts" menthod for more information on how it works.
/// </summary>
- public async Task<ReadPageServiceModel> GetPage(GetPageServiceModel model)
+ public async Task<ReadPageServiceModel> GetPage(GetPageServiceModel getPageServiceModel)
{
User user = null;
- if (model.UserId != Guid.Empty)
- user = await this._userRepository.GetByIdAsync(model.UserId);
- else if (!string.IsNullOrEmpty(model.Username))
- user = await this._userRepository.GetByUsernameAsync(model.Username);
+ if (getPageServiceModel.UserId != Guid.Empty)
+ user = await this._userRepository.GetByIdAsync(getPageServiceModel.UserId);
+ else if (!string.IsNullOrEmpty(getPageServiceModel.Username))
+ user = await this._userRepository.GetByUsernameAsync(getPageServiceModel.Username);
else
throw new ArgumentException("Invalid given data!");
@@ -46,7 +46,7 @@ namespace DevHive.Services.Services
throw new ArgumentException("User has no friends to get feed from!");
List<Post> posts = await this._feedRepository
- .GetFriendsPosts(user.Friends.ToList(), model.FirstRequestIssued, model.PageNumber, model.PageSize);
+ .GetFriendsPosts(user.Friends.ToList(), getPageServiceModel.FirstRequestIssued, getPageServiceModel.PageNumber, getPageServiceModel.PageSize);
ReadPageServiceModel readPageServiceModel = new();
foreach (Post post in posts)
diff --git a/src/Services/DevHive.Services/Services/RateService.cs b/src/Services/DevHive.Services/Services/RateService.cs
index 5e924ab..caf4b80 100644
--- a/src/Services/DevHive.Services/Services/RateService.cs
+++ b/src/Services/DevHive.Services/Services/RateService.cs
@@ -28,7 +28,7 @@ namespace DevHive.Services.Services
{
throw new NotImplementedException();
// if (!await this._postRepository.DoesPostExist(ratePostServiceModel.PostId))
- // throw new ArgumentException("Post does not exist!");
+ // throw new ArgumentException("Post does not exist!");
// if (!await this._userRepository.DoesUserExistAsync(ratePostServiceModel.UserId))
// throw new ArgumentException("User does not exist!");