Also take country and price when adding wine.

This commit is contained in:
2020-03-26 16:31:37 +01:00
parent 6b4d16adde
commit 119d52828f
2 changed files with 5 additions and 1 deletions

View File

@@ -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();

View File

@@ -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);