Added move document feature

This commit is contained in:
NGPixel
2016-09-09 19:22:18 -04:00
parent f0916dcfe6
commit 492bb9efa6
16 changed files with 207 additions and 52 deletions

View File

@@ -376,7 +376,24 @@ module.exports = {
},
/**
* Move a document
*
* @param {String} entryPath The current entry path
* @param {String} newEntryPath The new entry path
* @return {Promise} Promise of the operation
*/
move(entryPath, newEntryPath) {
let self = this;
return git.moveDocument(entryPath, newEntryPath).then(() => {
return git.commitDocument(newEntryPath).then(() => {
return self.updateCache(newEntryPath);
});
});
},
/**
* Generate a starter page content based on the entry path