Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update get-program.ts

Steven Tey6a4388daa4b4
diff --git a/apps/web/lib/fetchers/get-program.ts b/apps/web/lib/fetchers/get-program.ts
index 076b4234fb..2f87a51156 100644
--- a/apps/web/lib/fetchers/get-program.ts
+++ b/apps/web/lib/fetchers/get-program.ts
@@ -15,24 +15,8 @@ export const getProgram = cache(
slug,
},
include: {
- ...(include?.includes("allRewards") && {
- rewards: include.includes("allRewards")
- ? true
- : {
- where: {
- default: true, // program-wide rewards only
- },
- },
- }),
- ...(include?.includes("allDiscounts") && {
- discounts: include.includes("allDiscounts")
- ? true
- : {
- where: {
- default: true, // program-wide discounts only
- },
- },
- }),
+ rewards: include?.includes("allRewards") ? true : undefined,
+ discounts: include?.includes("allDiscounts") ? true : undefined,
},
});