Exemple #1
0
        public async Task <IActionResult> DeleteDictionaryFromSection(Guid dictionaryId, Guid sectionId)
        {
            if (!(await _service.IsSectionExist(sectionId)))
            {
                return(NotFound());
            }

            if (!(await _service.IsDictionaryExist(dictionaryId)))
            {
                return(NotFound());
            }

            if (!(await _service.IsDictionaryInSection(dictionaryId, sectionId)))
            {
                return(NotFound());
            }
            await _service.DeleteDictionaryFromSection(dictionaryId, sectionId);

            await _service.Save();

            return(Ok());
        }