public async Task <IActionResult> Post(Guid flowId, StateRequestModel model) { var state = await _stateService.Create(new State() { FlowId = flowId, Title = model.Title }); return(CreatedAtAction(nameof(Get), new { id = state.Id }, _mapper.Map <StateResponseModel>(state))); }
async Task <IActionResult> Put(Guid id, StateRequestModel model) { var state = await _stateService.Update(new State() { Id = id, Title = model.Title }); if (state == null) { return(NotFound()); } return(Ok(_mapper.Map <StateResponseModel>(state))); }