From 3290917b1c4fb390f7dc05aa9999fe48a124fecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Viricel?= Date: Mon, 7 Dec 2020 17:58:35 +0100 Subject: [PATCH] Add isFruit to fruit object for letting know the API that it's a fruit --- src/components/AddFruit.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/AddFruit.vue b/src/components/AddFruit.vue index 8d29afb..3a336ad 100644 --- a/src/components/AddFruit.vue +++ b/src/components/AddFruit.vue @@ -95,7 +95,8 @@ export default { data() { return { fruit: { - color: "#000000" + color: "#000000", + isFruit: true } }; }, @@ -111,6 +112,7 @@ export default { this.fruit.image = url; }, async checkForm(e) { + this.fruit.expires = new Date(this.fruit.expires); await this.$store .dispatch("addFruit", this.fruit) .then(() => this.$store.commit("toggleModal"));