diff options
| author | transtrike <transtrike@gmail.com> | 2021-01-17 12:44:46 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2021-01-17 12:44:46 +0200 |
| commit | 797d034dce057cf2aaec1574ee0b640b1d570416 (patch) | |
| tree | c0dcb9cf2a0ee72bc28b99aeed2315df6321fde6 /src/DevHive.Web/Controllers/TechnologyController.cs | |
| parent | c43a7665b9febe890eb6dac143b62c36464cc94d (diff) | |
| download | DevHive-797d034dce057cf2aaec1574ee0b640b1d570416.tar DevHive-797d034dce057cf2aaec1574ee0b640b1d570416.tar.gz DevHive-797d034dce057cf2aaec1574ee0b640b1d570416.zip | |
Made Lang&Tech layers consistant; Merged C**D methods to Update
Diffstat (limited to 'src/DevHive.Web/Controllers/TechnologyController.cs')
| -rw-r--r-- | src/DevHive.Web/Controllers/TechnologyController.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/DevHive.Web/Controllers/TechnologyController.cs b/src/DevHive.Web/Controllers/TechnologyController.cs index 7f2f400..104b96e 100644 --- a/src/DevHive.Web/Controllers/TechnologyController.cs +++ b/src/DevHive.Web/Controllers/TechnologyController.cs @@ -35,19 +35,19 @@ namespace DevHive.Web.Controllers } [HttpGet] - public async Task<IActionResult> GetById(Guid technologyId) + public async Task<IActionResult> GetById(Guid id) { - CreateTechnologyServiceModel createTechnologyServiceModel = await this._technologyService.GetTechnologyById(technologyId); + CreateTechnologyServiceModel createTechnologyServiceModel = await this._technologyService.GetTechnologyById(id); CreateTechnologyWebModel createTechnologyWebModel = this._technologyMapper.Map<CreateTechnologyWebModel>(createTechnologyServiceModel); return new OkObjectResult(createTechnologyWebModel); } [HttpPut] - public async Task<IActionResult> Update(Guid technologyId, [FromBody] UpdateTechnologyWebModel updateModel) + public async Task<IActionResult> Update(Guid id, [FromBody] UpdateTechnologyWebModel updateModel) { UpdateTechnologyServiceModel updateTechnologyServiceModel = this._technologyMapper.Map<UpdateTechnologyServiceModel>(updateModel); - updateTechnologyServiceModel.Id = technologyId; + updateTechnologyServiceModel.Id = id; bool result = await this._technologyService.UpdateTechnology(updateTechnologyServiceModel); @@ -58,9 +58,9 @@ namespace DevHive.Web.Controllers } [HttpDelete] - public async Task<IActionResult> Delete(Guid technologyId) + public async Task<IActionResult> Delete(Guid id) { - bool result = await this._technologyService.DeleteTechnology(technologyId); + bool result = await this._technologyService.DeleteTechnology(id); if (!result) return new BadRequestObjectResult("Could not delete Technology"); |
