public async Task <IActionResult> Post(FlowRequestModel model) { var flow = await _flowService.Create(new Flow() { Title = model.Title }); return(CreatedAtAction(nameof(Get), new { id = flow.Id }, _mapper.Map <FlowResponseModel>(flow))); }
public async Task <IActionResult> Put(Guid id, FlowRequestModel model) { var flow = await _flowService.Update(new Flow() { Id = id, Title = model.Title }); if (flow == null) { return(NotFound()); } return(Ok(_mapper.Map <FlowResponseModel>(flow))); }