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

@@ -33,7 +33,7 @@ async function showDialog() {
async function savePrefix() {
const prefix = $treePrefixInput.val();
await server.put('tree/' + branchId + '/set-prefix', { prefix: prefix });
await server.put('branches/' + branchId + '/set-prefix', { prefix: prefix });
await treeService.setPrefix(branchId, prefix);

View File

@@ -25,7 +25,7 @@ async function showNoteRevisionsDialog(noteId, noteRevisionId) {
$list.empty();
$content.empty();
revisionItems = await server.get('note-revisions/' + noteId);
revisionItems = await server.get('notes/' + noteId + '/revisions');
for (const item of revisionItems) {
const dateModified = utils.parseDate(item.dateModifiedFrom);

View File

@@ -34,10 +34,7 @@ async function showDialog() {
}
async function saveOptions(optionName, optionValue) {
await server.post('options', {
name: optionName,
value: optionValue
});
await server.put('options/' + encodeURIComponent(optionName) + '/' + encodeURIComponent(optionValue));
infoService.showMessage("Options change have been saved.");
}