From 73a4450ee2883a69c1823bc412e9450aa6fc390a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Claus-Peter=20H=C3=BCbner?= Date: Fri, 10 Feb 2023 21:34:40 +0100 Subject: [PATCH] port of home-community base on <...PORT> + (V1_0 = 5010, V2_0 = 5020) --- dht-node/src/dht_node/index.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dht-node/src/dht_node/index.ts b/dht-node/src/dht_node/index.ts index ab81792df..2fd6cd1e7 100644 --- a/dht-node/src/dht_node/index.ts +++ b/dht-node/src/dht_node/index.ts @@ -189,11 +189,9 @@ export const startDHT = async (topic: string): Promise => { } async function writeHomeCommunityEnries(pubKey: any): Promise { - const homeApiVersions: CommunityApi[] = Object.values(ApiVersionType).map(function ( - apiEnum, - idx, - ) { - const port = Number.parseInt(CONFIG.FEDERATION_COMMUNITY_API_PORT) + idx + 1 + const homeApiVersions: CommunityApi[] = Object.values(ApiVersionType).map(function (apiEnum) { + const port = + Number.parseInt(CONFIG.FEDERATION_COMMUNITY_API_PORT) + Number(apiEnum.replace('_', '')) const comApi: CommunityApi = { api: apiEnum, url: CONFIG.FEDERATION_COMMUNITY_URL + ':' + port.toString() + '/api/',