Rating become undefined #31

Open
opened 2020-09-07 08:42:46 +00:00 by kasperrt · 1 comment
kasperrt commented 2020-09-07 08:42:46 +00:00 (Migrated from github.com)

preview

![preview](https://puu.sh/Gq6jG/a756e2c4f5.png)
KevinMidboe commented 2020-10-11 17:18:22 +00:00 (Migrated from github.com)

The issue here is that we don't use vivino api anymore, but vinmonopolet where we don't have a rating.
Should update findSaveWine to keep more of the wine attributes:

{
  name: prelotteryWine.name,
  vivinoLink: prelotteryWine.vivinoLink,
  rating: prelotteryWine.rating,
  occurences: 1,
  image: prelotteryWine.image,
  id: prelotteryWine.id
}

from the wine object:

const Wine = new Schema({
  name: String,
  vivinoLink: String,
  rating: Number,
  occurences: Number,
  id: String,
  image: String,
  price: String,
  country: String
});

Here were missing price and country.

The issue here is that we don't use vivino api anymore, but vinmonopolet where we don't have a rating. Should update `findSaveWine` to keep more of the wine attributes: ```javascript { name: prelotteryWine.name, vivinoLink: prelotteryWine.vivinoLink, rating: prelotteryWine.rating, occurences: 1, image: prelotteryWine.image, id: prelotteryWine.id } ``` from the wine object: ```javascript const Wine = new Schema({ name: String, vivinoLink: String, rating: Number, occurences: Number, id: String, image: String, price: String, country: String }); ``` Here were missing `price` and `country`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KevinMidboe/vinlottis#31
No description provided.