diff --git a/frontend/src/api/users.js b/frontend/src/api/users.js index edf85bc3a..7d66798ee 100644 --- a/frontend/src/api/users.js +++ b/frontend/src/api/users.js @@ -32,7 +32,7 @@ export const userAPI = { let response = await apiReq.post( authURLs.token, formData, - function() { return i18n.t('user.incorrect-username-or-password'); }, + null, function() { return i18n.t('user.user-successfully-logged-in'); } ); return response; diff --git a/frontend/src/components/Login/LoginForm.vue b/frontend/src/components/Login/LoginForm.vue index 52eca4c54..4e66c3ac2 100644 --- a/frontend/src/components/Login/LoginForm.vue +++ b/frontend/src/components/Login/LoginForm.vue @@ -98,11 +98,10 @@ export default { this.clear(); this.$store.commit("setToken", response.data.access_token); this.$emit("logged-in"); + let user = await api.users.self(); + this.$store.commit("setUserData", user); } - let user = await api.users.self(); - this.$store.commit("setUserData", user); - this.loading = false; }, }, diff --git a/frontend/src/components/MealPlan/ShoppingListDialog.vue b/frontend/src/components/MealPlan/ShoppingListDialog.vue index 8bd2da175..a3b635402 100644 --- a/frontend/src/components/MealPlan/ShoppingListDialog.vue +++ b/frontend/src/components/MealPlan/ShoppingListDialog.vue @@ -22,7 +22,7 @@ @@ -75,8 +75,9 @@ export default { this.getRawIngredients(); }, getRawIngredients() { + this.rawIngredients = []; this.ingredients.forEach(element => { - this.rawIngredients.push(element.recipeIngredient); + this.rawIngredients.push(element.recipe_ingredient); }); this.rawIngredients = this.rawIngredients.flat(); diff --git a/frontend/src/components/Recipe/Parts/Assets.vue b/frontend/src/components/Recipe/Parts/Assets.vue index 65d4ec0ae..c8a094d5b 100644 --- a/frontend/src/components/Recipe/Parts/Assets.vue +++ b/frontend/src/components/Recipe/Parts/Assets.vue @@ -38,7 +38,7 @@