From 52cebaee3a7aedfe18ef3ab5f28be56e7272d023 Mon Sep 17 00:00:00 2001 From: Martin Sottnik Date: Mon, 1 Jul 2024 13:03:26 +0200 Subject: [PATCH] encode uniconfig nodeId in requests --- src/external-api/uniconfig.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/external-api/uniconfig.ts b/src/external-api/uniconfig.ts index 950a0324..f6177ae0 100644 --- a/src/external-api/uniconfig.ts +++ b/src/external-api/uniconfig.ts @@ -175,7 +175,9 @@ export async function getUniconfigDatastore( const json = await sendGetRequest( [ baseURL, - `/data/network-topology:network-topology/network-topology:topology=uniconfig/network-topology:node=${nodeId}/frinx-uniconfig-topology:configuration?content=${DATA_STORE_MAP[datastoreType]}`, + `/data/network-topology:network-topology/network-topology:topology=uniconfig/network-topology:node=${encodeURIComponent( + nodeId, + )}/frinx-uniconfig-topology:configuration?content=${DATA_STORE_MAP[datastoreType]}`, ], cookie, ); @@ -194,7 +196,9 @@ export async function updateUniconfigDataStore( await sendPutRequest( [ baseURL, - `/data/network-topology:network-topology/network-topology:topology=uniconfig/network-topology:node=${nodeId}/frinx-uniconfig-topology:configuration`, + `/data/network-topology:network-topology/network-topology:topology=uniconfig/network-topology:node=${encodeURIComponent( + nodeId, + )}/frinx-uniconfig-topology:configuration`, ], params, cookie,