mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-20 16:47:50 +02:00
qfix: backups using pipeline (#9396)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
+3
-15
@@ -1,7 +1,5 @@
|
||||
import { getWorkspaceById, getWorkspaceByUrl, type AccountDB, type Workspace } from '@hcengineering/account'
|
||||
import {
|
||||
systemAccountUuid,
|
||||
type WorkspaceUuid,
|
||||
type AttachedData,
|
||||
type AttachedDoc,
|
||||
type Class,
|
||||
@@ -9,10 +7,9 @@ import {
|
||||
type DocumentUpdate,
|
||||
type Ref,
|
||||
type Space,
|
||||
type TxOperations
|
||||
type TxOperations,
|
||||
type WorkspaceUuid
|
||||
} from '@hcengineering/core'
|
||||
import { getTransactorEndpoint } from '@hcengineering/server-client'
|
||||
import { generateToken } from '@hcengineering/server-token'
|
||||
|
||||
export async function findOrUpdateAttached<T extends AttachedDoc> (
|
||||
client: TxOperations,
|
||||
@@ -61,13 +58,4 @@ export async function getWorkspace (db: AccountDB, workspace: string): Promise<W
|
||||
return wsObj
|
||||
}
|
||||
|
||||
export function getToolToken (workspace?: WorkspaceUuid): string {
|
||||
return generateToken(systemAccountUuid, workspace, { service: 'tool' })
|
||||
}
|
||||
|
||||
export async function getWorkspaceTransactorEndpoint (
|
||||
workspace: WorkspaceUuid,
|
||||
type: 'external' | 'internal' = 'external'
|
||||
): Promise<string> {
|
||||
return await getTransactorEndpoint(getToolToken(workspace), type)
|
||||
}
|
||||
export { getToolToken, getWorkspaceTransactorEndpoint } from '@hcengineering/server-tool'
|
||||
|
||||
Reference in New Issue
Block a user