Exemplo n.º 1
0
        public async Task <IActionResult> Put([FromBody] CustomerDto model)
        {
            if (!await _permissionService.Authorize(PermissionSystemName.Customers))
            {
                return(Forbid());
            }

            if (ModelState.IsValid)
            {
                model = await _customerApiService.UpdateCustomer(model);

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