Look for products default price

This commit is contained in:
Jonathan Barrow
2022-09-20 19:40:11 -04:00
parent 84a34ff0a5
commit 8a542f38e7

View File

@@ -291,7 +291,7 @@ router.get('/upgrade', requireLoginMiddleware, async (request, response) => {
.filter(product => product.active)
.sort((a, b) => +a.metadata.tier_level - +b.metadata.tier_level)
.map(product => {
const price = prices.find(price => price.product === product.id);
const price = prices.find(price => price.id === product.default_price);
const perks = [];
if (product.metadata.discord_read === 'true') {