Skip to content

Commit

Permalink
added: companyName to be returned when getting campaign (#333)
Browse files Browse the repository at this point in the history
Co-authored-by: quantum-grit <[email protected]>
  • Loading branch information
quantum-grit and quantum-grit authored Sep 4, 2022
1 parent cc0f445 commit c55d107
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions apps/api/src/campaign/campaign.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,14 @@ export class CampaignService {
where: { state: { in: [CampaignState.active, CampaignState.complete] } },
include: {
campaignType: { select: { category: true } },
beneficiary: { select: { person: true } },
beneficiary: {
select: {
id: true,
type: true,
person: { select: { id: true, firstName: true, lastName: true } },
company: { select: { id: true, companyName: true } },
},
},
coordinator: { select: { person: true } },
organizer: { select: { person: true } },
campaignFiles: true,
Expand All @@ -62,7 +69,14 @@ export class CampaignService {
},
include: {
campaignType: { select: { name: true, slug: true } },
beneficiary: { select: { person: { select: { firstName: true, lastName: true } } } },
beneficiary: {
select: {
id: true,
type: true,
person: { select: { id: true, firstName: true, lastName: true } },
company: { select: { id: true, companyName: true } },
},
},
coordinator: { select: { person: { select: { firstName: true, lastName: true } } } },
organizer: { select: { person: { select: { firstName: true, lastName: true } } } },
incomingTransfers: { select: { amount: true } },
Expand Down Expand Up @@ -173,6 +187,7 @@ export class CampaignService {
type: true,
publicData: true,
person: { select: { id: true, firstName: true, lastName: true } },
company: { select: { id: true, companyName: true } },
},
},
coordinator: {
Expand Down

1 comment on commit c55d107

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 72.42% 1804/2491
🔴 Branches 44.81% 216/482
🔴 Functions 45.02% 217/482
🟡 Lines 70.49% 1593/2260

Test suite run success

172 tests passing in 62 suites.

Report generated by 🧪jest coverage report action from c55d107

Please sign in to comment.