fix comment space
This commit is contained in:
parent
c9b1cad982
commit
16c1e864af
1 changed files with 15 additions and 8 deletions
|
|
@ -234,21 +234,28 @@ export class PageService {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// update spaceId in shares
|
|
||||||
if (pageIds.length > 0) {
|
if (pageIds.length > 0) {
|
||||||
|
// update spaceId in shares
|
||||||
await trx
|
await trx
|
||||||
.updateTable('shares')
|
.updateTable('shares')
|
||||||
.set({ spaceId: spaceId })
|
.set({ spaceId: spaceId })
|
||||||
.where('pageId', 'in', pageIds)
|
.where('pageId', 'in', pageIds)
|
||||||
.execute();
|
.execute();
|
||||||
}
|
|
||||||
|
|
||||||
// Update attachments
|
// Update comments
|
||||||
await this.attachmentRepo.updateAttachmentsByPageId(
|
await trx
|
||||||
{ spaceId },
|
.updateTable('comments')
|
||||||
pageIds,
|
.set({ spaceId: spaceId })
|
||||||
trx,
|
.where('pageId', 'in', pageIds)
|
||||||
);
|
.execute();
|
||||||
|
|
||||||
|
// Update attachments
|
||||||
|
await this.attachmentRepo.updateAttachmentsByPageId(
|
||||||
|
{ spaceId },
|
||||||
|
pageIds,
|
||||||
|
trx,
|
||||||
|
);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue