Remove console statements

This commit is contained in:
2020-12-07 19:11:32 +01:00
parent 2d83491839
commit 73b7786d1a
2 changed files with 8 additions and 3 deletions

View File

@@ -20,7 +20,9 @@ export default {
await axios
.post("http://localhost:3000/fruit", fruit)
.then(res => commit("addFruit", res.data))
.catch(err => console.log(err))
.catch(err => {
throw new Error(err.message);
})
.finally(() => commit("setLoading", false));
},
removeFruit: async ({ commit }, id) => {
@@ -30,7 +32,9 @@ export default {
commit("removeFruit", id);
commit("toggleDeleteMode");
})
.catch(err => console.log(err));
.catch(err => {
throw new Error(err.message);
});
},
getImageFromUnsplash: async ({ commit }, keyword) => {
commit("setLoading", true);