diff options
Diffstat (limited to 'src/DevHive.Web')
| -rw-r--r-- | src/DevHive.Web/Controllers/RoleController.cs | 16 | ||||
| -rw-r--r-- | src/DevHive.Web/Controllers/UserController.cs | 14 | ||||
| -rw-r--r-- | src/DevHive.Web/DevHive.Web.csproj | 2 |
3 files changed, 18 insertions, 14 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); } } } diff --git a/src/DevHive.Web/Controllers/UserController.cs b/src/DevHive.Web/Controllers/UserController.cs index 900af42..f241409 100644 --- a/src/DevHive.Web/Controllers/UserController.cs +++ b/src/DevHive.Web/Controllers/UserController.cs @@ -15,12 +15,12 @@ namespace DevHive.Web.Controllers [Route("/api/[controller]")] public class UserController: ControllerBase { - private readonly UserService _service; + private readonly UserService _userService; private readonly IMapper _userMapper; public UserController(DevHiveContext context, IMapper mapper, JWTOptions jwtOptions) { - this._service = new UserService(context, mapper, jwtOptions); + this._userService = new UserService(context, mapper, jwtOptions); this._userMapper = mapper; } @@ -30,7 +30,7 @@ namespace DevHive.Web.Controllers { LoginServiceModel loginServiceModel = this._userMapper.Map<LoginServiceModel>(loginModel); - return await this._service.LoginUser(loginServiceModel); + return await this._userService.LoginUser(loginServiceModel); } [HttpPost] @@ -39,14 +39,14 @@ namespace DevHive.Web.Controllers { RegisterServiceModel registerServiceModel = this._userMapper.Map<RegisterServiceModel>(registerModel); - return await this._service.RegisterUser(registerServiceModel); + return await this._userService.RegisterUser(registerServiceModel); } //Read [HttpGet] public async Task<IActionResult> GetById(Guid id) { - return await this._service.GetUserById(id); + return await this._userService.GetUserById(id); } //Update @@ -57,7 +57,7 @@ namespace DevHive.Web.Controllers UpdateUserServiceModel updateUserServiceModel = this._userMapper.Map<UpdateUserServiceModel>(updateModel); updateUserServiceModel.Id = id; - return await this._service.UpdateUser(updateUserServiceModel); + return await this._userService.UpdateUser(updateUserServiceModel); } //Delete @@ -65,7 +65,7 @@ namespace DevHive.Web.Controllers [Authorize] public async Task<IActionResult> Delete(Guid id) { - return await this._service.DeleteUser(id); + return await this._userService.DeleteUser(id); } } } diff --git a/src/DevHive.Web/DevHive.Web.csproj b/src/DevHive.Web/DevHive.Web.csproj index 5b5478d..7f7ba49 100644 --- a/src/DevHive.Web/DevHive.Web.csproj +++ b/src/DevHive.Web/DevHive.Web.csproj @@ -6,7 +6,7 @@ <PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="5.0.1" NoWarn="NU1605" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.1" NoWarn="NU1605" /> - <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.0" /> + <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.1" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" /> |
