feat(LOY-63): redeem campaign

This commit is contained in:
Christian Andolf
2024-12-20 16:56:33 +01:00
parent 29d1721a8a
commit 9584478b34
17 changed files with 552 additions and 391 deletions

View File

@@ -202,6 +202,7 @@ export const rewardQueryRouter = router({
}
const data = await apiResponse.json()
const validatedApiRewards = isNewEndpoint
? validateCategorizedRewardsSchema.safeParse(data)
: validateApiRewardSchema.safeParse(data)
@@ -256,6 +257,10 @@ export const rewardQueryRouter = router({
id: apiReward?.id,
rewardType: apiReward?.rewardType,
redeemLocation: apiReward?.redeemLocation,
operaRewardId:
apiReward && "operaRewardId" in apiReward
? apiReward.operaRewardId
: "",
}
})