From 5a4dda12ff431f433e0637d0baf161260bed62a0 Mon Sep 17 00:00:00 2001 From: Reginald Cherenfant Jasmin Date: Fri, 1 Sep 2023 12:14:25 -0400 Subject: [PATCH] Update on the controller for NoContent return type --- .../Controllers/LocationsController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DamageAssesmentApi/DamageAssesment.Api.Locations/Controllers/LocationsController.cs b/DamageAssesmentApi/DamageAssesment.Api.Locations/Controllers/LocationsController.cs index 0ee489a..d919c07 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Locations/Controllers/LocationsController.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Locations/Controllers/LocationsController.cs @@ -27,7 +27,7 @@ namespace DamageAssesment.Api.Locations.Controllers { return Ok(result.locations); } - return NotFound(); + return NoContent(); } /// @@ -78,9 +78,9 @@ namespace DamageAssesment.Api.Locations.Controllers { return Ok(result.Question); } - return NotFound(); + return BadRequest(); } - return CreatedAtRoute("DefaultApi", new { id = Location.Id }, Location); + return BadRequest(); } /// /// Delete an existing location.