Skip to content

Commit

Permalink
Merge branch 'master' into sort-bank-transactions-desc
Browse files Browse the repository at this point in the history
  • Loading branch information
dphilipov committed Sep 18, 2023
2 parents 3594185 + 4bcec53 commit 1458936
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/api/src/person/person.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,14 @@ export class PersonService {
}

async findOne(id: string) {
return await this.prisma.person.findFirst({ where: { id } })
return await this.prisma.person.findFirst({
where: { id },
include: {
organizer: { select: { id: true, _count: { select: { campaigns: true } } } },
coordinators: { select: { id: true, _count: { select: { campaigns: true } } } },
beneficiaries: { select: { id: true, _count: { select: { campaigns: true } } } },
},
})
}

async findByEmail(email: string) {
Expand Down

0 comments on commit 1458936

Please sign in to comment.