diff --git a/api/update.js b/api/update.js index b4961c9..a604a68 100644 --- a/api/update.js +++ b/api/update.js @@ -22,15 +22,15 @@ router.route("/log/wines").post(async (req, res) => { res.send(false); return; } - console.log(req.body); const wines = req.body; - console.log(wines); for (let i = 0; i < wines.length; i++) { let wine = wines[i]; let newWonWine = new PreLotteryWine({ name: wine.name, vivinoLink: wine.vivinoLink, - rating: wine.rating + rating: wine.rating, + image: wine.image, + id: wine.id }); await newWonWine.save(); } diff --git a/schemas/PreLotteryWine.js b/schemas/PreLotteryWine.js index 71699fc..7b3ede8 100644 --- a/schemas/PreLotteryWine.js +++ b/schemas/PreLotteryWine.js @@ -4,7 +4,9 @@ const Schema = mongoose.Schema; const PreLotteryWine = new Schema({ name: String, vivinoLink: String, - rating: Number + rating: Number, + id: String, + image: String }); module.exports = mongoose.model("PreLotteryWine", PreLotteryWine); diff --git a/schemas/Wine.js b/schemas/Wine.js index ecfd113..cf07180 100644 --- a/schemas/Wine.js +++ b/schemas/Wine.js @@ -5,7 +5,9 @@ const Wine = new Schema({ name: String, vivinoLink: String, rating: Number, - occurences: Number + occurences: Number, + id: String, + image: String }); module.exports = mongoose.model("Wine", Wine); diff --git a/src/components/RegisterPage.vue b/src/components/RegisterPage.vue index 46f6983..d5eb9ce 100644 --- a/src/components/RegisterPage.vue +++ b/src/components/RegisterPage.vue @@ -27,37 +27,44 @@ Vinnere

-
- -
-
- -
-
- -
-
- -
-
- +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +

@@ -80,6 +87,12 @@ placeholder="Vivino-link" />
+
+ +
+
+ +
@@ -112,7 +125,9 @@ export default { wine: { name: wine.name, vivinoLink: wine.vivinoLink, - rating: wine.rating + rating: wine.rating, + image: wine.image, + id: wine.id } }); } @@ -122,7 +137,9 @@ export default { this.wines.push({ name: "", vivinoLink: "", - rating: "" + rating: "", + id: "", + image: "" }); }, sendWines: async function() { @@ -235,8 +252,6 @@ input { font-size: 1.5rem; width: 100%; } -.label-div { -} hr { width: 50vw; } @@ -297,6 +312,24 @@ hr { font-size: 1.22rem; } +.input-container { + & .label-div { + width: 100%; + } +} + +.winnner-container-inner { + display: flex; +} + +.wine-image { + padding-left: 30px; + + & img { + height: 400px; + } +} + input, button { font-size: 1.5rem;