Skip to content

Commit

Permalink
return user roles (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
tongo-angelov authored Sep 18, 2023
1 parent df8b701 commit 4bcec53
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 4bcec53

Please sign in to comment.