diff --git a/.tmp/auth_info.json b/.tmp/auth_info.json new file mode 100644 index 0000000..984127e --- /dev/null +++ b/.tmp/auth_info.json @@ -0,0 +1 @@ +{"accessToken":"EHaQCy2SuKGiKfHUqEC-1ATx1fyv-_RFI1hX_l_v5HdRywxp","port":40609} \ No newline at end of file diff --git a/extensions/pouchdb/stores/apps.js b/extensions/pouchdb/stores/apps.js index 478e74f..666daca 100644 --- a/extensions/pouchdb/stores/apps.js +++ b/extensions/pouchdb/stores/apps.js @@ -36,6 +36,22 @@ class AppsStore extends PouchdbHandler { }) } + /** + * + * @param {object} data + * @return {object} + * + */ + update(data) { + console.log(data) + return this.db.put(data) + .then((response) => { + return response + }).catch((error) => { + console.log(error) + }) + } + /** * find one app by id * @@ -47,6 +63,7 @@ class AppsStore extends PouchdbHandler { const query = { 'fields': [ '_id', + '_rev', 'name', 'command', 'description', diff --git a/src/js/forms/apps.riot b/src/js/forms/apps.riot index 4f35d89..ae1c9db 100644 --- a/src/js/forms/apps.riot +++ b/src/js/forms/apps.riot @@ -11,6 +11,9 @@
( state.validator.submit(event) ) }>