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:
@@ -37,8 +37,7 @@ import core, {
|
||||
TxRemoveDoc,
|
||||
TxUpdateDoc,
|
||||
Type,
|
||||
type MeasureContext,
|
||||
type WorkspaceDataId
|
||||
type MeasureContext
|
||||
} from '@hcengineering/core'
|
||||
import notification, { CommonInboxNotification, MentionInboxNotification } from '@hcengineering/notification'
|
||||
import { StorageAdapter, TriggerControl } from '@hcengineering/server-core'
|
||||
@@ -402,8 +401,7 @@ async function getCreateReferencesTxes (
|
||||
const blobId = (createdDoc as any)[attr.name] as Ref<Blob>
|
||||
if (blobId != null) {
|
||||
try {
|
||||
const dataId = control.workspace.dataId ?? (control.workspace.uuid as unknown as WorkspaceDataId)
|
||||
const buffer = await storage.read(ctx, dataId, blobId)
|
||||
const buffer = await storage.read(ctx, control.workspace, blobId)
|
||||
const markup = Buffer.concat(buffer as any).toString()
|
||||
const attrReferences = getReferencesData(srcDocId, srcDocClass, attachedDocId, attachedDocClass, markup)
|
||||
refs.push(...attrReferences)
|
||||
@@ -450,8 +448,7 @@ async function getUpdateReferencesTxes (
|
||||
try {
|
||||
const blobId = (updatedDoc as any)[attr.name] as Ref<Blob>
|
||||
if (blobId != null) {
|
||||
const dataId = control.workspace.dataId ?? (control.workspace.uuid as unknown as WorkspaceDataId)
|
||||
const buffer = await storage.read(ctx, dataId, blobId)
|
||||
const buffer = await storage.read(ctx, control.workspace, blobId)
|
||||
const markup = Buffer.concat(buffer as any).toString()
|
||||
const attrReferences = getReferencesData(srcDocId, srcDocClass, attachedDocId, attachedDocClass, markup)
|
||||
references.push(...attrReferences)
|
||||
|
||||
Reference in New Issue
Block a user