public ResponseMessage DeleteStructure(int id)
        {
            ResponseMessage responseMessage = new ResponseMessage();

            responseMessage = _structureRepository.DeleteStructure(id);
            return(responseMessage);
        }
Exemplo n.º 2
0
        public IActionResult Delete(int id)
        {
            var currentUserProfile = GetCurrentUserProfile();
            var structure          = _structureRepository.GetStructureById(id);
            var upr = _reportRepository.GetUserProfileReportById(structure.ReportId, currentUserProfile.Id);


            if (upr != null)
            {
                _structureRepository.DeleteStructure(id);
                return(NoContent());
            }

            else
            {
                return(Unauthorized());
            }
        }