Ejemplo n.º 1
0
 public async Task <IActionResult> DeleteField([FromRoute] int cvId, [FromRoute] int sectionId, [FromRoute] int fieldId)
 {
     if (await _cvService.GetCVSection(cvId, sectionId) == null &&
         await _cvService.GetSectionField(sectionId, fieldId) == null)
     {
         return(NotFound());
     }
     if (await _cvService.DeleteField(fieldId))
     {
         return(NoContent());
     }
     return(BadRequest());
 }