Skip to content

Commit

Permalink
fix: 283 - show public events also for going query (#360)
Browse files Browse the repository at this point in the history
Co-authored-by: Birloi Florian <[email protected]>
  • Loading branch information
birloiflorian and Birloi Florian authored Aug 14, 2024
1 parent 44678a3 commit a382525
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/src/modules/event/repositories/event.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,11 @@ export class EventRepository
const query = this.createSelectOpenOrganizationGoingEventsBaseSelectQuery();

query.andWhere(
'(event.endDate > :currentDate OR event.endDate IS NULL) AND v.status = :active AND v.userId = :userId',
'(event.endDate > :currentDate OR event.endDate IS NULL) AND ((v.status = :active AND v.userId = :userId) OR event.isPublic = :isPublic)',
{
currentDate: new Date(),
active: VolunteerStatus.ACTIVE,
isPublic: true,
},
);

Expand Down

0 comments on commit a382525

Please sign in to comment.