Track node versions in page version
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Garrett Mills 2020-11-02 12:37:04 -06:00
parent 40eb3bb1f2
commit 3b9d8acccb
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

View File

@ -269,6 +269,18 @@ class Page extends VersionedModel {
return children return children
} }
async cast_to_version_data() {
const data = await super.cast_to_version_data()
const node_version_nums = []
const nodes = await this.nodes
for ( const node of nodes ) {
node_version_nums.push({ NodeId: node.UUID, version_num: node.version_num })
}
data.node_version_nums = node_version_nums
return data
}
} }
module.exports = exports = Page; module.exports = exports = Page;