fix: use concatLink for transactor URL (#5659)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov 2024-05-24 11:28:21 +07:00 committed by GitHub
parent 053a43e878
commit aeb3b64f32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,