Exemple #1
0
        public async Task <IActionResult> Put([FromBody] CategoryDto model)
        {
            if (!await _permissionService.Authorize(PermissionSystemName.Categories))
            {
                return(Forbid());
            }

            if (ModelState.IsValid)
            {
                model = await _categoryApiService.UpdateCategory(model);

                return(Ok(model));
            }
            return(BadRequest(ModelState));
        }