diff --git a/src/renderer/store/modules/settings.js b/src/renderer/store/modules/settings.js index a85c8dec..d33bdb81 100644 --- a/src/renderer/store/modules/settings.js +++ b/src/renderer/store/modules/settings.js @@ -1,5 +1,7 @@ +import electron from 'electron' import Datastore from 'nedb' -const localDataStorage = '/db' +// TODO: Add logic for database when electron is not in use +const localDataStorage = electron.remote.app.getPath('userData') const settingsDb = new Datastore({ filename: localDataStorage + '/settings.db', diff --git a/src/renderer/store/modules/subscriptions.js b/src/renderer/store/modules/subscriptions.js index b0894598..76abb26d 100644 --- a/src/renderer/store/modules/subscriptions.js +++ b/src/renderer/store/modules/subscriptions.js @@ -1,5 +1,7 @@ +import electron from 'electron' import Datastore from 'nedb' -const localDataStorage = '/db' +// TODO: Add logic for database when electron is not in use +const localDataStorage = electron.remote.app.getPath('userData') const subDb = new Datastore({ filename: localDataStorage + '/subscriptions.db',