mirror of
https://github.com/docmost/docmost.git
synced 2026-08-30 10:26:25 +08:00
page property
This commit is contained in:
@@ -159,6 +159,16 @@ async function buildCtx(
|
||||
.execute();
|
||||
ctx.attachmentNames = new Map(rows.map((a) => [a.id, a.fileName]));
|
||||
}
|
||||
} else if (fromType === BasePropertyType.PAGE) {
|
||||
const ids = collectIds(chunk, propertyId);
|
||||
if (ids.size > 0) {
|
||||
const rows = await db
|
||||
.selectFrom('pages')
|
||||
.select(['id', 'title'])
|
||||
.where('id', 'in', Array.from(ids))
|
||||
.execute();
|
||||
ctx.pageTitles = new Map(rows.map((p) => [p.id, p.title ?? '']));
|
||||
}
|
||||
}
|
||||
|
||||
return ctx;
|
||||
|
||||
Reference in New Issue
Block a user