Website Summary Files Commits Branches @commit @diff @stats
path: root / src / DevHive.Services / Services / RoleService.cs
diff options
context:
space:
mode:
Commitdf52b1068e16adc50ffd365e2e8b8ea19b59fac3 (patch)
Author
 transtrike <transtrike@gmail.com>
2021-01-26 11:44:41 +0200
Committer
 transtrike <transtrike@gmail.com>
2021-01-26 11:44:41 +0200
Files3636d4b3fe2d5f88817b11007ff573c1ea920e0a /src/DevHive.Services/Services/RoleService.cs
DevHive-df52b1068e16adc50ffd365e2e8b8ea19b59fac3.tar
DevHive-df52b1068e16adc50ffd365e2e8b8ea19b59fac3.tar.gz
DevHive-df52b1068e16adc50ffd365e2e8b8ea19b59fac3.zip
Parentd2bc08c0dcd6f0dc0822333bbb00c9fc851f49cb (diff)
UserUpdate does not allow updating roles if not admin; HTTP Put now works properly; UserUpdate validates properly
1 files changed, 2 insertions, 2 deletions
-rw-r--r--src/DevHive.Services/Services/RoleService.cs4
diff --git a/src/DevHive.Services/Services/RoleService.cs b/src/DevHive.Services/Services/RoleService.cs
index 9f7a5ac..a8b8e17 100644
--- a/src/DevHive.Services/Services/RoleService.cs
+++ b/src/DevHive.Services/Services/RoleService.cs
@@ -38,12 +38,12 @@ namespace DevHive.Services.Services
}
- public async Task<ReadRoleServiceModel> GetRoleById(Guid id)
+ public async Task<RoleServiceModel> GetRoleById(Guid id)
{
Role role = await this._roleRepository.GetByIdAsync(id)
?? throw new ArgumentException("Role does not exist!");
- return this._roleMapper.Map<ReadRoleServiceModel>(role);
+ return this._roleMapper.Map<RoleServiceModel>(role);
}
public async Task<bool> UpdateRole(UpdateRoleServiceModel updateRoleServiceModel)