diff options
author | Stefan Malzner <stefan@adlk.io> | 2018-03-18 21:06:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-18 21:06:30 +0100 |
commit | adc67db3a46b5d5de411c4b73f92464fbe64a03c (patch) | |
tree | 85e10e35f8867e3e747c92e0eddc0a75bdb94516 /src/stores/ServicesStore.js | |
parent | Merge pull request #798 from meetfranz/fix/order-performance (diff) | |
parent | Add debug flags to render process (diff) | |
download | ferdium-app-adc67db3a46b5d5de411c4b73f92464fbe64a03c.tar.gz ferdium-app-adc67db3a46b5d5de411c4b73f92464fbe64a03c.tar.zst ferdium-app-adc67db3a46b5d5de411c4b73f92464fbe64a03c.zip |
Merge pull request #805 from meetfranz/chore/add-debugger
Replace console logs with debugger
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r-- | src/stores/ServicesStore.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index c2dbff55d..f7d92b1ff 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -10,6 +10,8 @@ import CachedRequest from './lib/CachedRequest'; | |||
10 | import { matchRoute } from '../helpers/routing-helpers'; | 10 | import { matchRoute } from '../helpers/routing-helpers'; |
11 | import { gaEvent } from '../lib/analytics'; | 11 | import { gaEvent } from '../lib/analytics'; |
12 | 12 | ||
13 | const debug = require('debug')('ServiceStore'); | ||
14 | |||
13 | export default class ServicesStore extends Store { | 15 | export default class ServicesStore extends Store { |
14 | @observable allServicesRequest = new CachedRequest(this.api.services, 'all'); | 16 | @observable allServicesRequest = new CachedRequest(this.api.services, 'all'); |
15 | @observable createServiceRequest = new Request(this.api.services, 'create'); | 17 | @observable createServiceRequest = new Request(this.api.services, 'create'); |
@@ -109,7 +111,7 @@ export default class ServicesStore extends Store { | |||
109 | return activeService; | 111 | return activeService; |
110 | } | 112 | } |
111 | 113 | ||
112 | console.warn('Service not available'); | 114 | debug('Service not available'); |
113 | } | 115 | } |
114 | 116 | ||
115 | return null; | 117 | return null; |
@@ -123,10 +125,10 @@ export default class ServicesStore extends Store { | |||
123 | const recipesStore = this.stores.recipes; | 125 | const recipesStore = this.stores.recipes; |
124 | 126 | ||
125 | if (recipesStore.isInstalled(recipeId)) { | 127 | if (recipesStore.isInstalled(recipeId)) { |
126 | console.debug('Recipe is installed'); | 128 | debug(`Recipe ${recipeId} is installed`); |
127 | this._redirectToAddServiceRoute(recipeId); | 129 | this._redirectToAddServiceRoute(recipeId); |
128 | } else { | 130 | } else { |
129 | console.warn('Recipe is not installed'); | 131 | debug(`Recipe ${recipeId} is not installed`); |
130 | // We access the RecipeStore action directly | 132 | // We access the RecipeStore action directly |
131 | // returns Promise instead of action | 133 | // returns Promise instead of action |
132 | await this.stores.recipes._install({ recipeId }); | 134 | await this.stores.recipes._install({ recipeId }); |
@@ -493,7 +495,7 @@ export default class ServicesStore extends Store { | |||
493 | if (service) { | 495 | if (service) { |
494 | service.webview.openDevTools(); | 496 | service.webview.openDevTools(); |
495 | } else { | 497 | } else { |
496 | console.warn('No service is active'); | 498 | debug('No service is active'); |
497 | } | 499 | } |
498 | } | 500 | } |
499 | 501 | ||