diff --git a/apps/web-api/src/pl-events/pl-event-guests.service.ts b/apps/web-api/src/pl-events/pl-event-guests.service.ts index 8ceb10da9..d66a1bb95 100644 --- a/apps/web-api/src/pl-events/pl-event-guests.service.ts +++ b/apps/web-api/src/pl-events/pl-event-guests.service.ts @@ -39,11 +39,11 @@ export class PLEventGuestsService { ) { try { const isAdmin = this.memberService.checkIfAdminUser(member); - await this.updateMemberDetails(data, member, isAdmin, tx); + this.updateMemberDetails(data, member, isAdmin, tx); data.memberUid = isAdmin ? data.memberUid : member.uid; const guests = this.formatInputToEventGuests(data); const result = await (tx || this.prisma).pLEventGuest.createMany({ data: guests }); - await this.cacheService.reset(); + this.cacheService.reset(); return result; } catch(err) { this.handleErrors(err); @@ -68,7 +68,7 @@ export class PLEventGuestsService { const events = type === "upcoming" ? location.upcomingEvents : location.pastEvents; return await this.prisma.$transaction(async (tx) => { const isAdmin = this.memberService.checkIfAdminUser(member); - await tx.pLEventGuest.deleteMany({ + tx.pLEventGuest.deleteMany({ where: { memberUid: isAdmin ? data.memberUid : member.uid, eventUid: { @@ -206,7 +206,7 @@ export class PLEventGuestsService { } }); this.restrictTelegramBasedOnMemberPreference(result, isUserLoggedIn); - this.restrictOfficeHours(result, isUserLoggedIn); + // this.restrictOfficeHours(result, isUserLoggedIn); return result; } catch(err) { @@ -287,10 +287,10 @@ export class PLEventGuestsService { restrictTelegramBasedOnMemberPreference(eventGuests, isUserLoggedIn: boolean) { if (isUserLoggedIn && eventGuests) { eventGuests = eventGuests.map((guest:any) => { - if (!guest.telegramId) { - delete guest.member.telegramHandler; - return guest; - } + // if (!guest.telegramId) { + // delete guest.member.telegramHandler; + // return guest; + // } if (!guest.member.preferences) { return guest; } diff --git a/apps/web-api/src/pl-events/pl-events.service.ts b/apps/web-api/src/pl-events/pl-events.service.ts index dbaaf3952..bffa28acb 100644 --- a/apps/web-api/src/pl-events/pl-events.service.ts +++ b/apps/web-api/src/pl-events/pl-events.service.ts @@ -119,7 +119,7 @@ export class PLEventsService { if (plEvent) { this.filterPrivateResources(plEvent, isUserLoggedIn); plEvent.eventGuests = this.eventGuestsService.restrictTelegramBasedOnMemberPreference(plEvent?.eventGuests, isUserLoggedIn); - plEvent.eventGuests = this.eventGuestsService.restrictOfficeHours(plEvent?.eventGuests, isUserLoggedIn); + // plEvent.eventGuests = this.eventGuestsService.restrictOfficeHours(plEvent?.eventGuests, isUserLoggedIn); } return plEvent; } catch(err) {