Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rating become undefined #31

Open
kasperrt opened this issue Sep 7, 2020 · 1 comment
Open

Rating become undefined #31

kasperrt opened this issue Sep 7, 2020 · 1 comment

Comments

@kasperrt
Copy link
Collaborator

kasperrt commented Sep 7, 2020

preview

@KevinMidboe
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants