Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getUsers function #410

Merged
merged 2 commits into from
Apr 16, 2024
Merged

Fix getUsers function #410

merged 2 commits into from
Apr 16, 2024

Conversation

annarhughes
Copy link
Member

What changes did you make?

Refactored the query builder in getUsers function, to use find and conditional parameters

Why did you make the changes?

Following typeorm 0.2.0 -> 0.3.0 update in #405 , calling getUsers resulted in the error:
ERROR [error] Failed GET "/api/v1/user?searchCriteria=%7B%22email%22%3A%22tech%2B1111%40chayn.co%22%2C%22partnerAccess%22%3A%7B%22featureTherapy%22%3Atrue%2C%22active%22%3Atrue%7D%2C%22include%22%3A%5B%22partnerAccess%22%5D%2C%22fields%22%3A%5B%22partnerAccess%22%5D%2C%22limit%22%3A%2210%22%7D" for ::ffff:192.168.65.1 - status: undefined, message: missing FROM-clause entry for table "partneraccess"

There seems to be an issue using left joins on user.partnerAccess in this case, but there were no errors using .find

@annarhughes annarhughes merged commit 825a027 into develop Apr 16, 2024
3 checks passed
@annarhughes annarhughes deleted the fix-get-users-function branch April 16, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant