aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-01-19 19:05:25 +0200
committertranstrike <transtrike@gmail.com>2021-01-19 19:05:25 +0200
commit3203ba85dd1948096547608791d82ce83ce123be (patch)
treed6ed61158d571beaeaea8e4b7c54849bc65c781f /src
parent163827d4a8dbc4b41bfa0f78edc7dd30626e95d3 (diff)
downloadDevHive-3203ba85dd1948096547608791d82ce83ce123be.tar
DevHive-3203ba85dd1948096547608791d82ce83ce123be.tar.gz
DevHive-3203ba85dd1948096547608791d82ce83ce123be.zip
Fixed more issues
Diffstat (limited to 'src')
-rw-r--r--src/DevHive.Web/Controllers/RoleController.cs8
-rw-r--r--src/DevHive.Web/Models/Identity/Role/UpdateRoleWebModel.cs5
2 files changed, 8 insertions, 5 deletions
diff --git a/src/DevHive.Web/Controllers/RoleController.cs b/src/DevHive.Web/Controllers/RoleController.cs
index f173ea4..227b877 100644
--- a/src/DevHive.Web/Controllers/RoleController.cs
+++ b/src/DevHive.Web/Controllers/RoleController.cs
@@ -48,11 +48,11 @@ namespace DevHive.Web.Controllers
[HttpPut]
public async Task<IActionResult> Update(Guid id, [FromBody] UpdateRoleWebModel updateRoleWebModel)
{
- RoleServiceModel roleServiceModel =
- this._roleMapper.Map<RoleServiceModel>(updateRoleWebModel);
- roleServiceModel.Id = id;
+ UpdateRoleServiceModel updateRoleServiceModel =
+ this._roleMapper.Map<UpdateRoleServiceModel>(updateRoleWebModel);
+ updateRoleServiceModel.Id = id;
- bool result = await this._roleService.UpdateRole(roleServiceModel);
+ bool result = await this._roleService.UpdateRole(updateRoleServiceModel);
if (!result)
return new BadRequestObjectResult("Could not update role!");
diff --git a/src/DevHive.Web/Models/Identity/Role/UpdateRoleWebModel.cs b/src/DevHive.Web/Models/Identity/Role/UpdateRoleWebModel.cs
index 213ec55..aaf0270 100644
--- a/src/DevHive.Web/Models/Identity/Role/UpdateRoleWebModel.cs
+++ b/src/DevHive.Web/Models/Identity/Role/UpdateRoleWebModel.cs
@@ -1,6 +1,9 @@
+using System;
+
namespace DevHive.Web.Models.Identity.Role
{
- public class UpdateRoleWebModel : CreateRoleWebModel
+ public class UpdateRoleWebModel : RoleWebModel
{
+ public Guid Id { get; set; }
}
}