mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-13 21:27:46 +02:00
Fix Bitrix attachments (#2683)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -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> {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user