Skip to content

Commit

Permalink
Clarified prisma query
Browse files Browse the repository at this point in the history
  • Loading branch information
neketka committed Apr 30, 2024
1 parent a2c8538 commit 9ea5d39
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions server/src/achievement/achievement.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,11 @@ export class AchievementService {

const achsWithoutTrackers = await this.prisma.achievement.findMany({
where: {
id: achievement?.id,
AND: [accessibleBy(ability).Achievement],
trackers: { none: { userId: user.id } },
AND: [
{ id: achievement?.id },
accessibleBy(ability).Achievement,
{ trackers: { none: { userId: user.id } } },
],
},
});

Expand Down

0 comments on commit 9ea5d39

Please sign in to comment.