changes in API format

This commit is contained in:
azivner
2018-04-01 20:33:10 -04:00
parent 311952d4dd
commit a066c6fe2b
18 changed files with 79 additions and 91 deletions

View File

@@ -119,10 +119,10 @@ async function unprotectNoteAndSendToServer() {
noteDetail.setNoteBackgroundIfProtected(note);
}
async function protectSubTree(noteId, protect) {
async function protectBranch(noteId, protect) {
await ensureProtectedSession(true, true);
await server.put('notes/' + noteId + "/protect-sub-tree/" + (protect ? 1 : 0));
await server.put('notes/' + noteId + "/protect/" + (protect ? 1 : 0));
infoService.showMessage("Request to un/protect sub tree has finished successfully");
@@ -143,6 +143,6 @@ export default {
ensureProtectedSession,
protectNoteAndSendToServer,
unprotectNoteAndSendToServer,
protectSubTree,
protectBranch,
ensureDialogIsClosed
};