public async Task <ApiResponse <PutResult <Guid> > > Put([FromBody] StateMachineInputDto dto) { var key = await _stateMachineService.Put(dto); var result = new PutResult <Guid>(key); return(ApiResponse.OK(result)); }
public async Task <ApiResponse <PatchResult> > Patch(string name, [FromBody] StateMachineInputDto dto) { var patched = await _stateMachineService.Patch(name, dto); var result = new PatchResult(patched); if (patched <= 0) { return(ApiResponse.NotFound(Response, "state machine not found", result)); } return(ApiResponse.OK(result)); }