Update on the controller for NoContent return type

This commit is contained in:
Reginald Cherenfant Jasmin 2023-09-01 12:14:25 -04:00
parent cd261a5556
commit 5a4dda12ff

View File

@ -27,7 +27,7 @@ namespace DamageAssesment.Api.Locations.Controllers
{
return Ok(result.locations);
}
return NotFound();
return NoContent();
}
/// <summary>
@ -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();
}
/// <summary>
/// Delete an existing location.