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)); }