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,
|
||||
rating: wine.rating,
|
||||
image: wine.image,
|
||||
price: wine.price,
|
||||
country: wine.country,
|
||||
id: wine.id
|
||||
});
|
||||
await newWonWine.save();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user