1
0
mirror of https://github.com/TandoorRecipes/recipes.git synced 2026-01-11 09:07:12 -05:00

added err msg to all standard toasts

This commit is contained in:
vabene1111
2022-04-23 01:41:08 +02:00
parent e4223787be
commit 30d5587fbe
14 changed files with 66 additions and 93 deletions

View File

@@ -187,7 +187,7 @@ export default {
this.ingredients = result.data
this.loading = false
}).catch((err) => {
StandardToasts.makeStandardToast(this,StandardToasts.FAIL_FETCH)
StandardToasts.makeStandardToast(this,StandardToasts.FAIL_FETCH, err)
this.loading = false
})
}
@@ -208,8 +208,8 @@ export default {
let apiClient = new ApiApiFactory()
apiClient.updateIngredient(i.id, i).then(r => {
this.$set(i, 'changed', false)
}).catch((r, e) => {
StandardToasts.makeStandardToast(this,StandardToasts.FAIL_UPDATE)
}).catch(err => {
StandardToasts.makeStandardToast(this,StandardToasts.FAIL_UPDATE, err)
})
})
},
@@ -219,8 +219,8 @@ export default {
apiClient.destroyIngredient(i.id).then(r => {
StandardToasts.makeStandardToast(this,StandardToasts.SUCCESS_DELETE)
this.ingredients = this.ingredients.filter(li => li.id !== i.id)
}).catch(e => {
StandardToasts.makeStandardToast(this,StandardToasts.FAIL_DELETE)
}).catch(err => {
StandardToasts.makeStandardToast(this,StandardToasts.FAIL_DELETE, err)
})
}
}