Skip to content

Commit

Permalink
fix: Extend campaign response to include organizer's company name (#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashko9807 authored Apr 11, 2024
1 parent 2703318 commit 6414873
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion apps/api/src/campaign/campaign.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,15 @@ export class CampaignService {
organizer: {
select: {
id: true,
person: { select: { id: true, firstName: true, lastName: true, email: true } },
person: {
select: {
id: true,
firstName: true,
lastName: true,
email: true,
company: { select: { id: true, companyName: true } },
},
},
},
},
campaignFiles: true,
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/organizer/organizer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class OrganizerService {
findAll() {
return this.prisma.organizer.findMany({
include: {
person: true,
person: { include: { company: { select: { id: true, companyName: true } } } },
campaigns: { select: { id: true, slug: true } },
},
})
Expand Down
1 change: 1 addition & 0 deletions apps/api/src/person/person.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export class PersonService {
organizer: { select: { id: true } },
coordinators: { select: { id: true } },
beneficiaries: { select: { id: true } },
company: { select: { id: true, companyName: true } },
},
})

Expand Down

0 comments on commit 6414873

Please sign in to comment.