This commit is contained in:
Jori Lallo
2016-08-18 14:42:53 -07:00
parent 3089ac7bc8
commit e3e5ead9e0
5 changed files with 35 additions and 11 deletions

View File

@@ -142,7 +142,7 @@ const Atlas = sequelize.define('atlas', {
return newTree;
},
async addNodeToNavigationTree(document) {
addNodeToNavigationTree(document) {
const newNode = {
id: document.id,
title: document.title,
@@ -163,6 +163,7 @@ const Atlas = sequelize.define('atlas', {
};
this.navigationTree = insertNode(this.navigationTree);
return this.navigationTree;
},
async deleteDocument(document) {
const deleteNodeAndDocument = async (node, documentId, shouldDelete = false) => {