Task #21 - add page controller and page/node api endpoints

This commit is contained in:
garrettmills
2020-02-08 11:16:04 -06:00
parent 7c8bcd928f
commit 617a77b809
5 changed files with 152 additions and 3 deletions

View File

@@ -29,6 +29,11 @@ class Node extends Model {
const Page = this.model.get("api:Page")
return this.belongs_to_one(Page, "PageId", "_id")
}
update_from_raw(data) {
if ( data.Type ) this.Type = data.Type
if ( data.Value ) this.Value = data.Value
}
}
module.exports = exports = Node;