Fix Bitrix attachments (#2683)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2023-02-24 15:04:03 +07:00
committed by GitHub
parent a01b7e5d6c
commit 96f0fef450
10 changed files with 84 additions and 63 deletions
+3 -3
View File
@@ -26,7 +26,7 @@ import core, {
FindResult,
Ref,
Tx,
TxHander,
TxHandler,
TxResult
} from '@hcengineering/core'
import { getMetadata, PlatformError, readResponse, ReqId, serialize, UNAUTHORIZED } from '@hcengineering/platform'
@@ -51,7 +51,7 @@ class Connection implements ClientConnection {
constructor (
private readonly url: string,
private readonly handler: TxHander,
private readonly handler: TxHandler,
private readonly onUpgrade?: () => void,
private readonly onUnauthorized?: () => void
) {
@@ -229,7 +229,7 @@ class Connection implements ClientConnection {
*/
export async function connect (
url: string,
handler: TxHander,
handler: TxHandler,
onUpgrade?: () => void,
onUnauthorized?: () => void
): Promise<ClientConnection> {
+2 -2
View File
@@ -14,7 +14,7 @@
//
import clientPlugin from '@hcengineering/client'
import { Client, createClient, TxHander } from '@hcengineering/core'
import { Client, createClient, TxHandler } from '@hcengineering/core'
import { getMetadata, getPlugins, getResource } from '@hcengineering/platform'
import { connect } from './connection'
@@ -49,7 +49,7 @@ export default async () => {
if (client === undefined) {
const filterModel = getMetadata(clientPlugin.metadata.FilterModel) ?? false
client = createClient(
(handler: TxHander) => {
(handler: TxHandler) => {
const url = new URL(`/${token}`, endpoint)
console.log('connecting to', url.href)
return connect(url.href, handler, onUpgrade, onUnauthorized)