File tree Expand file tree Collapse file tree 1 file changed +19
-10
lines changed
apps/web/app/(ee)/api/bounties Expand file tree Collapse file tree 1 file changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -52,20 +52,29 @@ export const GET = withWorkspace(
5252 programId,
5353 // Filter only bounties the specified partner is eligible for
5454 ...( programEnrollment && {
55- OR : [
55+ AND : [
56+ // Filter out expired bounties
5657 {
57- groups : {
58- none : { } ,
59- } ,
58+ OR : [ { endsAt : null } , { endsAt : { gt : new Date ( ) } } ] ,
6059 } ,
60+ // Filter by partner's group eligibility
6161 {
62- groups : {
63- some : {
64- groupId :
65- programEnrollment . groupId ||
66- programEnrollment . program . defaultGroupId ,
62+ OR : [
63+ {
64+ groups : {
65+ none : { } ,
66+ } ,
6767 } ,
68- } ,
68+ {
69+ groups : {
70+ some : {
71+ groupId :
72+ programEnrollment . groupId ||
73+ programEnrollment . program . defaultGroupId ,
74+ } ,
75+ } ,
76+ } ,
77+ ] ,
6978 } ,
7079 ] ,
7180 } ) ,
You can’t perform that action at this time.
0 commit comments