diff options
author | Stefan Malzner <stefan@adlk.io> | 2018-03-18 16:37:21 +0100 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2018-03-18 16:37:21 +0100 |
commit | 88faef416eadc891537f03926160e35245125c72 (patch) | |
tree | db97bb469dcda8fb32a52b2c859b3b9988ad3cc5 /src/stores/RecipesStore.js | |
parent | fix(Service Tabs): Remove "delete service" context menu when not in developme... (diff) | |
download | ferdium-app-88faef416eadc891537f03926160e35245125c72.tar.gz ferdium-app-88faef416eadc891537f03926160e35245125c72.tar.zst ferdium-app-88faef416eadc891537f03926160e35245125c72.zip |
Replace console logs with debugger
Diffstat (limited to 'src/stores/RecipesStore.js')
-rw-r--r-- | src/stores/RecipesStore.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/stores/RecipesStore.js b/src/stores/RecipesStore.js index 67fee1d50..a24308f6a 100644 --- a/src/stores/RecipesStore.js +++ b/src/stores/RecipesStore.js | |||
@@ -5,6 +5,8 @@ import CachedRequest from './lib/CachedRequest'; | |||
5 | import Request from './lib/Request'; | 5 | import Request from './lib/Request'; |
6 | import { matchRoute } from '../helpers/routing-helpers'; | 6 | import { matchRoute } from '../helpers/routing-helpers'; |
7 | 7 | ||
8 | const debug = require('debug')('RecipeStore'); | ||
9 | |||
8 | export default class RecipesStore extends Store { | 10 | export default class RecipesStore extends Store { |
9 | @observable allRecipesRequest = new CachedRequest(this.api.recipes, 'all'); | 11 | @observable allRecipesRequest = new CachedRequest(this.api.recipes, 'all'); |
10 | @observable installRecipeRequest = new Request(this.api.recipes, 'install'); | 12 | @observable installRecipeRequest = new Request(this.api.recipes, 'install'); |
@@ -34,7 +36,7 @@ export default class RecipesStore extends Store { | |||
34 | return activeRecipe; | 36 | return activeRecipe; |
35 | } | 37 | } |
36 | 38 | ||
37 | console.warn('Recipe not installed'); | 39 | debug(`Recipe ${match.id} not installed`); |
38 | } | 40 | } |
39 | 41 | ||
40 | return null; | 42 | return null; |
@@ -54,10 +56,8 @@ export default class RecipesStore extends Store { | |||
54 | 56 | ||
55 | // Actions | 57 | // Actions |
56 | @action async _install({ recipeId }) { | 58 | @action async _install({ recipeId }) { |
57 | // console.log(this.installRecipeRequest._promise); | ||
58 | const recipe = await this.installRecipeRequest.execute(recipeId)._promise; | 59 | const recipe = await this.installRecipeRequest.execute(recipeId)._promise; |
59 | await this.allRecipesRequest.invalidate({ immediately: true })._promise; | 60 | await this.allRecipesRequest.invalidate({ immediately: true })._promise; |
60 | // console.log(this.installRecipeRequest._promise); | ||
61 | 61 | ||
62 | return recipe; | 62 | return recipe; |
63 | } | 63 | } |
@@ -67,7 +67,7 @@ export default class RecipesStore extends Store { | |||
67 | const recipes = {}; | 67 | const recipes = {}; |
68 | 68 | ||
69 | // Hackfix, reference this.all to fetch services | 69 | // Hackfix, reference this.all to fetch services |
70 | console.debug(`Check Recipe updates for ${this.all.map(recipe => recipe.id)}`); | 70 | debug(`Check Recipe updates for ${this.all.map(recipe => recipe.id)}`); |
71 | 71 | ||
72 | recipeIds.forEach((r) => { | 72 | recipeIds.forEach((r) => { |
73 | const recipe = this.one(r); | 73 | const recipe = this.one(r); |