aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Web/Controllers/RoleController.cs
diff options
context:
space:
mode:
authorDanail Dimitrov <danaildimitrov321@gmail.com>2020-12-15 22:00:51 +0200
committerDanail Dimitrov <danaildimitrov321@gmail.com>2020-12-15 22:00:51 +0200
commitaff6829331a7482b8b4ce64cda73cff3726d843e (patch)
tree2d183e064617ae959833a1cf194a8a9cc2c06023 /src/DevHive.Web/Controllers/RoleController.cs
parent30205791de8989f136eeafe652c9ab900855369d (diff)
parent791c559712a161c745a407a87d0f7e8d1f00492c (diff)
downloadDevHive-aff6829331a7482b8b4ce64cda73cff3726d843e.tar
DevHive-aff6829331a7482b8b4ce64cda73cff3726d843e.tar.gz
DevHive-aff6829331a7482b8b4ce64cda73cff3726d843e.zip
Adding LanguageController (Implemented all Language layers)
Diffstat (limited to 'src/DevHive.Web/Controllers/RoleController.cs')
-rw-r--r--src/DevHive.Web/Controllers/RoleController.cs16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/DevHive.Web/Controllers/RoleController.cs b/src/DevHive.Web/Controllers/RoleController.cs
index 8ccc1c6..e27c330 100644
--- a/src/DevHive.Web/Controllers/RoleController.cs
+++ b/src/DevHive.Web/Controllers/RoleController.cs
@@ -13,13 +13,17 @@ namespace DevHive.Web.Controllers
[Route("/api/[controller]")]
public class RoleController
{
- private readonly RoleService _service;
+ private readonly RoleService _roleService;
private readonly IMapper _roleMapper;
public RoleController(DevHiveContext context, IMapper mapper)
{
+<<<<<<< HEAD
this._service = new RoleService(context, mapper);
this._roleMapper = mapper;
+=======
+ this._roleService = new RoleService(context, mapper);
+>>>>>>> 791c559712a161c745a407a87d0f7e8d1f00492c
}
[HttpPost]
@@ -28,13 +32,13 @@ namespace DevHive.Web.Controllers
RoleServiceModel roleServiceModel =
this._roleMapper.Map<RoleServiceModel>(createRoleWebModel);
- return this._service.CreateRole(roleServiceModel);
+ return this._roleService.CreateRole(roleServiceModel);
}
[HttpGet]
- public Task<IActionResult> Get(Guid id)
+ public Task<IActionResult> GetById(Guid id)
{
- return this._service.GetRoleById(id);
+ return this._roleService.GetRoleById(id);
}
[HttpPut]
@@ -43,13 +47,13 @@ namespace DevHive.Web.Controllers
RoleServiceModel roleServiceModel =
this._roleMapper.Map<RoleServiceModel>(updateRoleWebModel);
- return this._service.UpdateRole(roleServiceModel);
+ return this._roleService.UpdateRole(roleServiceModel);
}
[HttpDelete]
public Task<IActionResult> Delete(Guid id)
{
- return this._service.DeleteRole(id);
+ return this._roleService.DeleteRole(id);
}
}
}