#78 - include file boxes in page children for sidebar
continuous-integration/drone/push Build is passing Details

master
Garrett Mills 3 years ago
parent e32d38e9b6
commit 1758340a7b
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

@ -280,6 +280,24 @@ class Page extends VersionedModel {
})
}
const FileBox = this.models.get('api:files:FileBox')
const boxes = await FileBox.find({
active: true,
pageId: this.UUID,
})
for ( const box of boxes ) {
if ( box.parentUUID ) continue; // only show top-level
children.push({
id: box.pageId,
// node_id // FIXME need to track this w/ the file boxes
children: [],
type: 'file_box',
name: box.name,
})
}
const Codium = this.models.get('api:Codium')
const codiums = await Codium.find({
PageId: this.UUID,

Loading…
Cancel
Save