mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-26 19:44:57 +02:00
UBERF-9429: Provide workspace ids to storage adapters (#7956)
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
@@ -19,7 +19,7 @@ import {
|
||||
decodeDocumentId
|
||||
} from '@hcengineering/collaborator-client'
|
||||
import { saveCollabJson } from '@hcengineering/collaboration'
|
||||
import { type Blob, type Ref, MeasureContext, type WorkspaceDataId } from '@hcengineering/core'
|
||||
import { type Blob, type Ref, MeasureContext } from '@hcengineering/core'
|
||||
import { Context } from '../../context'
|
||||
import { RpcMethodParams } from '../rpc'
|
||||
|
||||
@@ -37,12 +37,11 @@ export async function createContent (
|
||||
throw new Error(`Document ${documentName} already exists`)
|
||||
}
|
||||
|
||||
const { documentId, workspaceId } = decodeDocumentId(documentName)
|
||||
const { documentId } = decodeDocumentId(documentName)
|
||||
|
||||
const result: Record<string, Ref<Blob>> = {}
|
||||
const dataId = context.workspaceDataId ?? (workspaceId as WorkspaceDataId)
|
||||
for (const [field, markup] of Object.entries(content)) {
|
||||
const blob = await saveCollabJson(ctx, storageAdapter, dataId, documentId, markup)
|
||||
const blob = await saveCollabJson(ctx, storageAdapter, context.wsIds, documentId, markup)
|
||||
result[field] = blob
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user