Skip to content

Commit

Permalink
deepscan
Browse files Browse the repository at this point in the history
  • Loading branch information
sorja committed Jan 6, 2025
1 parent 08ca1ee commit 13b894f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/server/repository/public/user/utils/getPropsToQueryParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ type Returned = { whereConditions: Array<string>; queryParams: UserQueryParams }
export const getPropsToQueryParams = (props: UsersGetManyProps): Returned => {
const { countryIso, filters = {}, limit, offset } = props

const { administrators, countries, fullName, roles, disabled } = filters
const {
administrators,
countries,
fullName,
roles,
disabled,
statuses: defaultStatuses = [UserStatus.active],
} = filters

// Only return users with active status, unless other statuses specified outside
const defaultStatuses = props.filters.statuses ?? [UserStatus.active]
const statuses = disabled ? [UserStatus.disabled] : defaultStatuses

const queryParams: UserQueryParams = {}
Expand Down

0 comments on commit 13b894f

Please sign in to comment.