Fixed export servers to ensure autoConnect is not included

This commit is contained in:
Alejandro Celaya
2021-11-20 09:44:12 +01:00
parent 7db9974e8d
commit 14b2ee53b5
4 changed files with 13 additions and 6 deletions

View File

@@ -1,3 +1,4 @@
import { omit } from 'ramda';
import { SemVer } from '../../utils/helpers/version';
export interface ServerData {
@@ -43,3 +44,6 @@ export const isNotFoundServer = (server: SelectedServer): server is NotFoundServ
!!server?.hasOwnProperty('serverNotFound');
export const getServerId = (server: SelectedServer) => isServerWithId(server) ? server.id : '';
export const serverWithIdToServerData = (server: ServerWithId): ServerData =>
omit<ServerWithId, 'id' | 'autoConnect'>([ 'id', 'autoConnect' ], server);