update shared page spaceId

This commit is contained in:
Philipinho
2025-04-21 16:01:21 +01:00
parent 9e5339c86b
commit 410dce9ea9

View File

@ -223,6 +223,16 @@ export class PageService {
trx, trx,
); );
} }
// update spaceId in shares
if (pageIds.length > 0) {
await trx
.updateTable('shares')
.set({ spaceId: spaceId })
.where('pageId', 'in', pageIds)
.execute();
}
// Update attachments // Update attachments
await this.attachmentRepo.updateAttachmentsByPageId( await this.attachmentRepo.updateAttachmentsByPageId(
{ spaceId }, { spaceId },