Compare commits

...

1 Commits

Author SHA1 Message Date
bf06559298 Renamed all references to vivinoLink to more general link. 2020-03-26 16:42:52 +01:00
6 changed files with 11 additions and 11 deletions

View File

@@ -124,7 +124,7 @@ router.route("/wines/statistics/overall").get(async (req, res) => {
wines[wine._id] = { wines[wine._id] = {
name: wine.name, name: wine.name,
occurences: wine.occurences, occurences: wine.occurences,
vivinoLink: wine.vivinoLink, link: wine.link,
rating: wine.rating, rating: wine.rating,
image: wine.image, image: wine.image,
id: wine.id, id: wine.id,

View File

@@ -32,7 +32,7 @@ router.route("/log/wines").post(mustBeAuthenticated, async (req, res) => {
let wine = wines[i]; let wine = wines[i];
let newWonWine = new PreLotteryWine({ let newWonWine = new PreLotteryWine({
name: wine.name, name: wine.name,
vivinoLink: wine.vivinoLink, link: wine.link,
rating: wine.rating, rating: wine.rating,
image: wine.image, image: wine.image,
price: wine.price, price: wine.price,
@@ -90,7 +90,7 @@ router.route("/log").post(mustBeAuthenticated, async (req, res) => {
if (wonWine == undefined) { if (wonWine == undefined) {
let newWonWine = new Wine({ let newWonWine = new Wine({
name: currentWinner.wine.name, name: currentWinner.wine.name,
vivinoLink: currentWinner.wine.vivinoLink, link: currentWinner.wine.link,
rating: currentWinner.wine.rating, rating: currentWinner.wine.rating,
occurences: 1, occurences: 1,
image: currentWinner.wine.image, image: currentWinner.wine.image,

View File

@@ -175,7 +175,7 @@ export default {
color: "", color: "",
wine: { wine: {
name: wine.name, name: wine.name,
vivinoLink: wine.vivinoLink, link: wine.link,
rating: wine.rating, rating: wine.rating,
image: wine.image, image: wine.image,
id: wine.id id: wine.id
@@ -235,7 +235,7 @@ export default {
color: "", color: "",
wine: { wine: {
name: "", name: "",
vivinoLink: "", link: "",
rating: "" rating: ""
} }
}); });

View File

@@ -73,7 +73,7 @@ export default {
this.$emit("wine", { this.$emit("wine", {
name: response.name, name: response.name,
vivinoLink: "https://vinmonopolet.no" + response.url, link: "https://vinmonopolet.no" + response.url,
price: response.price.value, price: response.price.value,
image: response.images[1].url, image: response.images[1].url,
country: response.main_country.name, country: response.main_country.name,
@@ -112,4 +112,4 @@ h2 {
text-align: center; text-align: center;
color: $red; color: $red;
} }
</style> </style>

View File

@@ -11,7 +11,7 @@
<span v-if="wine.price">{{ wine.price }} NOK</span> <span v-if="wine.price">{{ wine.price }} NOK</span>
<span v-if="wine.country">{{ wine.country }}</span> <span v-if="wine.country">{{ wine.country }}</span>
<a v-if="wine.vivinoLink" :href="wine.vivinoLink" class="wine-link">Les mer {{ hostname(wine.vivinoLink) }}</a> <a v-if="wine.link" :href="wine.link" class="wine-link">Les mer {{ hostname(wine.link) }}</a>
</div> </div>
<slot v-if="shouldUseInlineSlot()"></slot> <slot v-if="shouldUseInlineSlot()"></slot>
@@ -146,4 +146,4 @@ a:visited {
color: $red; color: $red;
} }
} }
</style> </style>

View File

@@ -17,7 +17,7 @@
</span> </span>
<a <a
class="wine-link" class="wine-link"
:href="wine.vivinoLink" :href="wine.link"
@click="wineClick(wine, $event)" @click="wineClick(wine, $event)"
>Les mer</a> >Les mer</a>
</li> </li>
@@ -75,7 +75,7 @@ export default {
this.$ga.event({ this.$ga.event({
eventCategory: "Wines", eventCategory: "Wines",
eventAction: "click", eventAction: "click",
eventValue: `${wine.name} - ${wine.vivinoLink}` eventValue: `${wine.name} - ${wine.link}`
}); });
}, },
closeWine: function(event) { closeWine: function(event) {