Skip to content

Commit

Permalink
feat: simplify where
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasheartman committed Sep 25, 2024
1 parent 02a87d6 commit d4d4a9e
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,8 @@ export class PersonalDashboardReadModel implements IPersonalDashboardReadModel {
'group_role.role_id',
'group_roles.id',
)
.where(function () {
this.where('role_user.user_id', userId).orWhere(
'group_user.user_id',
userId,
);
})
.where('role_user.user_id', userId)
.orWhere('group_user.user_id', userId)
.whereNull('projects.archived_at')
.select(
'projects.name',
Expand Down

0 comments on commit d4d4a9e

Please sign in to comment.