public async Task HandleFetchSshKeyAction(FetchSshKeyAction action, IDispatcher dispatcher) { try { var sshKeys = await sshKeyService.GetSshKeysAsync(); dispatcher.Dispatch(new FetchSshKeySuccessAction(sshKeys)); } catch (Exception e) { dispatcher.Dispatch(new FetchSshKeyFailureAction(e.Message)); } }
public static SshKeyState ReduceFetchSshKeyAction(SshKeyState state, FetchSshKeyAction _) => new SshKeyState(null, true, null);