Ejemplo n.º 1
0
        public IActionResult RejectMaterial(int materialId)
        {
            var materialToReject = _materialsService.GetMaterial(materialId);

            if (materialToReject == null)
            {
                return(RedirectToAction("ResourceNotFound", "Error", new { error = "materiał o podanym Id nie istnieje." }));
            }

            _filesManagement.DeleteWholeMaterialFolder(materialId);
            _materialsService.RejectMaterial(materialToReject);
            return(RedirectToAction("MaterialsToApprove"));
        }