Skip to content

Commit

Permalink
build fail fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Danka Marcell committed Nov 27, 2024
1 parent 8eb27a9 commit f670ca1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/backend/src/band/band.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class BandService {
}

async addMember(bandId: number, userId: number): Promise<User> {
if (await this.prisma.bandMembership.findUnique({ where: { bandId_userId: { bandId, userId } } })) {
if (await this.prisma.bandMembership.findUnique({ where: { data: { bandId, userId } } })) {
throw new NotFoundException('User is already a member of the band');
}
if (!(await this.prisma.user.findUnique({ where: { id: userId } }))) {
Expand All @@ -86,7 +86,7 @@ export class BandService {
}

async removeMember(bandId: number, userId: number): Promise<User> {
if (!(await this.prisma.bandMembership.findUnique({ where: { bandId_userId: { bandId, userId } } }))) {
if (!(await this.prisma.bandMembership.findUnique({ where: { data: { bandId, userId } } }))) {
throw new NotFoundException('User is not a member of the band');
}
try {
Expand Down

0 comments on commit f670ca1

Please sign in to comment.