findUsers()

in src/lib/service/custos-service/custos-service-users.js [65:85]


    findUsers({offset = 0, limit = 20, username = null, groupId = null, clientId = null}) {
        if (groupId) {
            return this.custosService.axiosInstance.get(
                `${CustosService.ENDPOINTS.GROUPS}/user/group/memberships/child`,
                {
                    params: {"group.id": groupId, "client_id": clientId}
                }
            ).then(({data: {profiles}}) => {
                return profiles;
            });
        } else {
            return this.custosService.axiosInstance.get(
                `${CustosService.ENDPOINTS.USERS}/users`,
                {
                    params: {offset: offset, limit: limit, client_id: clientId, 'user.id': username}
                }
            ).then(({data: {users}}) => {
                return users;
            });
        }
    }