Пример #1
0
        public async Task <IActionResult> UpdateField([FromRoute] int cvId, [FromRoute] int sectionId, [FromRoute] int fieldId, [FromBody] CVFieldDataset updateField)
        {
            CVSectionDataset section = await _cvService.GetCVSection(cvId, sectionId);

            CVFieldDataset field = await _cvService.GetSectionField(sectionId, fieldId);

            if (section == null && field == null)
            {
                return(NotFound());
            }
            if (await _cvService.UpdateField(updateField))
            {
                return(NoContent());
            }
            return(BadRequest());
        }