From 119d52828f3587699be72d2fe4c87abc7169a270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Midb=C3=B8e?= Date: Thu, 26 Mar 2020 16:31:37 +0100 Subject: [PATCH] Also take country and price when adding wine. --- api/update.js | 2 ++ schemas/Wine.js | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/api/update.js b/api/update.js index 8726099..30a5e10 100644 --- a/api/update.js +++ b/api/update.js @@ -35,6 +35,8 @@ router.route("/log/wines").post(mustBeAuthenticated, async (req, res) => { vivinoLink: wine.vivinoLink, rating: wine.rating, image: wine.image, + price: wine.price, + country: wine.country, id: wine.id }); await newWonWine.save(); diff --git a/schemas/Wine.js b/schemas/Wine.js index cf07180..a24fc83 100644 --- a/schemas/Wine.js +++ b/schemas/Wine.js @@ -7,7 +7,9 @@ const Wine = new Schema({ rating: Number, occurences: Number, id: String, - image: String + image: String, + price: String, + country: String }); module.exports = mongoose.model("Wine", Wine);