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.

Revert endsAt for bounties (#3632)

Pedro Ladeira135e3bfc96e1
diff --git a/apps/web/lib/bounty/api/get-bounties-for-partner.ts b/apps/web/lib/bounty/api/get-bounties-for-partner.ts
index 77bc71df9e..2054b9a1fb 100644
--- a/apps/web/lib/bounty/api/get-bounties-for-partner.ts
+++ b/apps/web/lib/bounty/api/get-bounties-for-partner.ts
@@ -30,25 +30,18 @@ export async function getBountiesForPartner(
},
// If bounty has no groups, it's available to all partners
// If bounty has groups, only partners in those groups can see it
- AND: [
+ OR: [
{
- OR: [
- {
- groups: {
- none: {},
- },
- },
- {
- groups: {
- some: {
- groupId: groupId || program.defaultGroupId,
- },
- },
- },
- ],
+ groups: {
+ none: {},
+ },
},
{
- OR: [{ endsAt: null }, { endsAt: { gte: now } }],
+ groups: {
+ some: {
+ groupId: groupId || program.defaultGroupId,
+ },
+ },
},
],
},