Beispiel #1
0
 public async Task <IActionResult> UpdateSection([FromRoute] int cvId, [FromRoute] int sectionId, [FromBody] NewSectionParam section)
 {
     if (cvId != section.CVId || sectionId != section.SectionId)
     {
         return(Forbid());
     }
     if (await _cvService.GetCVSection(cvId, sectionId) == null)
     {
         return(NotFound());
     }
     if (await _cvService.UpdateSection(section))
     {
         return(NoContent());
     }
     return(BadRequest());
 }