예제 #1
0
        public IActionResult DeleteDocument(int schoolId, int courseId, int documentId)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            Document document = _schoolRepository.GetDocument(documentId, schoolId, courseId);

            if (document == null)
            {
                return(NotFound());
            }
            _schoolRepository.DeleteDocument(document, schoolId, courseId);
            return(NoContent());
        }