Exemple #1
0
        public IActionResult Delete(string key)
        {
            if (!_permissionService.Authorize(PermissionSystemName.Categories))
            {
                return(Forbid());
            }

            var category = _categoryApiService.GetById(key);

            if (category == null)
            {
                return(NotFound());
            }
            _categoryApiService.DeleteCategory(category);
            return(Ok());
        }