Also take country and price when adding wine.
This commit is contained in:
@@ -35,6 +35,8 @@ router.route("/log/wines").post(mustBeAuthenticated, async (req, res) => {
|
|||||||
vivinoLink: wine.vivinoLink,
|
vivinoLink: wine.vivinoLink,
|
||||||
rating: wine.rating,
|
rating: wine.rating,
|
||||||
image: wine.image,
|
image: wine.image,
|
||||||
|
price: wine.price,
|
||||||
|
country: wine.country,
|
||||||
id: wine.id
|
id: wine.id
|
||||||
});
|
});
|
||||||
await newWonWine.save();
|
await newWonWine.save();
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ const Wine = new Schema({
|
|||||||
rating: Number,
|
rating: Number,
|
||||||
occurences: Number,
|
occurences: Number,
|
||||||
id: String,
|
id: String,
|
||||||
image: String
|
image: String,
|
||||||
|
price: String,
|
||||||
|
country: String
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = mongoose.model("Wine", Wine);
|
module.exports = mongoose.model("Wine", Wine);
|
||||||
|
|||||||
Reference in New Issue
Block a user