UBERF-9429: Provide workspace ids to storage adapters (#7956)

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
Alexey Zinoviev
2025-02-14 15:59:36 +07:00
committed by GitHub
parent ddc8230890
commit e8df531654
53 changed files with 740 additions and 688 deletions
@@ -15,7 +15,7 @@
//
import attachment, { type Attachment } from '@hcengineering/attachment'
import type { Tx, TxRemoveDoc, WorkspaceDataId } from '@hcengineering/core'
import type { Tx, TxRemoveDoc } from '@hcengineering/core'
import type { TriggerControl } from '@hcengineering/server-core'
/**
@@ -45,8 +45,7 @@ export async function OnAttachmentDelete (
}
}
if (toDelete.length > 0) {
const dataId = workspace.dataId ?? (workspace.uuid as unknown as WorkspaceDataId)
await storageAdapter.remove(ctx, dataId, toDelete)
await storageAdapter.remove(ctx, workspace, toDelete)
}
return result