Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
🐛 Include user in membership response
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Nov 15, 2020
1 parent 595bdc5 commit bacd1e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/memberships/memberships.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class MembershipsService {
cursor,
where,
orderBy,
include: { group: true },
include: { group: true, user: true },
});
return memberships.map((user) => this.prisma.expose<memberships>(user));
}
Expand All @@ -75,7 +75,7 @@ export class MembershipsService {
): Promise<Expose<memberships>> {
const membership = await this.prisma.memberships.findOne({
where: { id },
include: { group: true },
include: { user: true },
});
if (!membership) throw new NotFoundException(MEMBERSHIP_NOT_FOUND);
if (membership.groupId !== groupId)
Expand Down

0 comments on commit bacd1e0

Please sign in to comment.