diff options
Diffstat (limited to 'library/controllers/index-db-controller.js')
-rw-r--r-- | library/controllers/index-db-controller.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/library/controllers/index-db-controller.js b/library/controllers/index-db-controller.js index 3373de113..bf840b98a 100644 --- a/library/controllers/index-db-controller.js +++ b/library/controllers/index-db-controller.js @@ -58,21 +58,17 @@ module.exports = class IndexDbController extends EventEmitter { }) } - put (key, store) { - return this.requestObjectStore(key, 'readwrite') + put (state) { + return this.requestObjectStore('dataStore', 'readwrite') .then((dataObject)=> { - const putRequest = dataObject.put(store) + const putRequest = dataObject.put(state, 'dataStore') putRequest.onsuccess = (event) => Promise.resolve(event.currentTarget.result) putRequest.onerror = (event) => Promise.reject(event) }) } - update (key, value) { - - } - migrate () { - this.db.createObjectStore(this.name) + this.db.createObjectStore('dataStore') } _add (key, objStore, cb = logger) { |