コード例 #1
0
        public IActionResult Post([FromBody] CategoryDto model)
        {
            if (!_permissionService.Authorize(PermissionSystemName.Categories))
            {
                return(Forbid());
            }

            if (ModelState.IsValid)
            {
                model = _categoryApiService.InsertOrUpdateCategory(model);
                return(Created(model));
            }
            return(BadRequest(ModelState));
        }