diff --git a/app/javascript/components/TheLogCreator.vue b/app/javascript/components/TheLogCreator.vue index 81ecbc0..d657620 100644 --- a/app/javascript/components/TheLogCreator.vue +++ b/app/javascript/components/TheLogCreator.vue @@ -56,8 +56,7 @@ created() { this.loadResource( - api.getRecipe(this.recipeId) - .then(data => { this.log.recipe = data; return data; }) + api.getRecipe(this.recipeId, data => this.log.recipe = data) ); }, diff --git a/app/javascript/components/TheRecipe.vue b/app/javascript/components/TheRecipe.vue index 3a4ba72..172050c 100644 --- a/app/javascript/components/TheRecipe.vue +++ b/app/javascript/components/TheRecipe.vue @@ -59,8 +59,7 @@ methods: { refreshData() { this.loadResource( - api.getRecipe(this.recipeId, this.scale, this.system, this.unit) - .then(data => { this.recipe = data; return data; }) + api.getRecipe(this.recipeId, this.scale, this.system, this.unit, data => this.recipe = data) ); } }, diff --git a/app/javascript/components/TheRecipeEditor.vue b/app/javascript/components/TheRecipeEditor.vue index 6bc1326..7a22e0d 100644 --- a/app/javascript/components/TheRecipeEditor.vue +++ b/app/javascript/components/TheRecipeEditor.vue @@ -48,8 +48,7 @@ created() { this.loadResource( - api.getRecipe(this.recipeId) - .then(data => { this.recipe = data; return data; }) + api.getRecipe(this.recipeId, data => { this.recipe = data; return data; }) ); }, diff --git a/app/javascript/components/TheRecipeList.vue b/app/javascript/components/TheRecipeList.vue index 173e974..9d4597c 100644 --- a/app/javascript/components/TheRecipeList.vue +++ b/app/javascript/components/TheRecipeList.vue @@ -1,6 +1,6 @@