From aeb3b64f3212d83908cd7de4bc4f6619a2d7f83d Mon Sep 17 00:00:00 2001 From: Alexander Onnikov Date: Fri, 24 May 2024 11:28:21 +0700 Subject: [PATCH] fix: use concatLink for transactor URL (#5659) Signed-off-by: Alexander Onnikov --- plugins/client-resources/src/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/client-resources/src/index.ts b/plugins/client-resources/src/index.ts index 8265edbf9b..f79f916bc5 100644 --- a/plugins/client-resources/src/index.ts +++ b/plugins/client-resources/src/index.ts @@ -24,6 +24,7 @@ import core, { TxPersistenceStore, TxWorkspaceEvent, WorkspaceEvent, + concatLink, createClient } from '@hcengineering/core' import platform, { @@ -88,7 +89,7 @@ export default async () => { let client = createClient( (handler: TxHandler) => { - const url = new URL(`/${token}`, endpoint) + const url = concatLink(endpoint, `/${token}`) const upgradeHandler: TxHandler = (...txes: Tx[]) => { for (const tx of txes) { @@ -109,7 +110,7 @@ export default async () => { } const tokenPayload: { workspace: string, email: string } = decodeTokenPayload(token) return connect( - url.href, + url, upgradeHandler, tokenPayload.workspace, tokenPayload.email,