public async Task <IActionResult> UpdateContract([FromRoute] int contractId, [FromBody] Hiroshima.DirectManager.Models.Requests.Contract contract) { var(_, isFailure, error) = await _contractManagementService.Update(contractId, contract); if (isFailure) { return(BadRequest(ProblemDetailsBuilder.Build(error))); } return(NoContent()); }
public async Task <IActionResult> AddContract([FromBody] Hiroshima.DirectManager.Models.Requests.Contract contract) { var(_, isFailure, response, error) = await _contractManagementService.Add(contract); if (isFailure) { return(BadRequest(ProblemDetailsBuilder.Build(error))); } return(Ok(response)); }