Skip to content

Commit

Permalink
add alcohol volume to tags
Browse files Browse the repository at this point in the history
  • Loading branch information
VovaStelmashchuk committed Sep 15, 2024
1 parent 44f7c00 commit 9a40d9f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion features/cocktail/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ async function getFullCocktailBySlug(slug) {
slug: tag.slug
}))

const alcoholVolume = cocktail.alcoholVolumes[0];
const alcoholVolumeTag = {
name: alcoholVolume.name,
url: `alcohol-volume=${alcoholVolume.slug}`,
slug: alcoholVolume.slug
}

const alcohols = cocktail.alcohols?.map(alcohol => ({
name: alcohol.name,
url: `alcohol=${alcohol.slug}`,
Expand Down Expand Up @@ -88,7 +95,7 @@ async function getFullCocktailBySlug(slug) {
images: cocktailImages,
goods: goods,
tools: glassware.concat(tools),
tags: taste.concat(tags).concat(alcohols),
tags: taste.concat(tags).concat(alcohols).concat([alcoholVolumeTag]),
article: article,
};
} catch (error) {
Expand Down

0 comments on commit 9a40d9f

Please sign in to comment.