rc
This commit is contained in:
@@ -44,6 +44,12 @@ export async function GET(request: NextRequest) {
|
||||
const pointsPerChf = parseFloat(
|
||||
settings.find(s => s.setting_key === 'points_per_chf')?.setting_value || '10'
|
||||
)
|
||||
const pointsToCryptoChf = parseFloat(
|
||||
settings.find(s => s.setting_key === 'points_to_crypto_chf')?.setting_value || '100'
|
||||
)
|
||||
const minRedemptionPoints = parseFloat(
|
||||
settings.find(s => s.setting_key === 'min_redemption_points')?.setting_value || '1000'
|
||||
)
|
||||
|
||||
// Calculate maximum discount available
|
||||
const maxDiscountChf = referralPoints / pointsToChf
|
||||
@@ -52,6 +58,8 @@ export async function GET(request: NextRequest) {
|
||||
referral_points: referralPoints,
|
||||
points_to_chf: pointsToChf,
|
||||
points_per_chf: pointsPerChf,
|
||||
points_to_crypto_chf: pointsToCryptoChf,
|
||||
min_redemption_points: minRedemptionPoints,
|
||||
max_discount_chf: maxDiscountChf,
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user