using server.method() instead of direct call to $.ajax - preparation for electron without network requests

This commit is contained in:
azivner
2017-11-28 20:52:38 -05:00
parent 14001f67d8
commit 54c0ff15b3
17 changed files with 150 additions and 217 deletions

View File

@@ -43,7 +43,7 @@ const searchTree = (function() {
}
if (e && e.which === $.ui.keyCode.ENTER) {
$.get(baseApiUrl + 'notes?search=' + searchText).then(resp => {
server.get('notes?search=' + searchText).then(resp => {
// Pass a string to perform case insensitive matching
getTree().filterBranches(node => {
return resp.includes(node.data.note_id);