mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-04-25 16:09:59 -05:00
Added perks array to tiers
This commit is contained in:
parent
b30402b904
commit
0241fb1f10
|
|
@ -517,12 +517,22 @@ router.get('/upgrade', async (request, response) => {
|
|||
|
||||
renderData.tiers = products.filter(product => product.active).map(product => {
|
||||
const price = prices.find(price => price.product === product.id);
|
||||
const perks = [];
|
||||
|
||||
if (product.metadata.discord_read === 'true') {
|
||||
perks.push('Read-only access to select dev channels on Discord');
|
||||
}
|
||||
|
||||
if (product.metadata.beta === 'true') {
|
||||
perks.push('Access the beta servers');
|
||||
}
|
||||
|
||||
return {
|
||||
price_id: price.id,
|
||||
thumbnail: product.images[0],
|
||||
name: product.name,
|
||||
description: product.description,
|
||||
perks,
|
||||
price: (price.unit_amount / 100).toLocaleString('en-US', { style: 'currency', currency: 'USD' }),
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user