-
Couldn't load subscription status.
- Fork 0
updated params for endpoint #34
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
base: main
Are you sure you want to change the base?
updated params for endpoint #34
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR extends the getParticipantsAccounts endpoint to support sorting by adding two new query parameters.
- Introduce
is_descendingandorder_byoptions in the method signature - Pass these new parameters through to the request
params
Comments suppressed due to low confidence (2)
src/endpoints/study/recruitment.ts:98
- Add a code comment or JSDoc block explaining the new
is_descendingandorder_byparameters, including the allowed values and default behavior when omitted.
params: {
src/endpoints/study/recruitment.ts:92
- There are no tests covering the new sorting behavior. Please add or update unit/integration tests to verify that
order_byandis_descendingproduce the expected API calls and response handling.
is_descending?: boolean | null;
| params: { | ||
| limit, | ||
| offset, | ||
| search, | ||
| response_as_dto, | ||
| is_descending, | ||
| order_by, | ||
| }, |
Copilot
AI
Jun 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider filtering out null or undefined values before sending the params object so that unwanted query strings (e.g., is_descending=null) are not included in the request URL.
| params: { | |
| limit, | |
| offset, | |
| search, | |
| response_as_dto, | |
| is_descending, | |
| order_by, | |
| }, | |
| params: Object.fromEntries( | |
| Object.entries({ | |
| limit, | |
| offset, | |
| search, | |
| response_as_dto, | |
| is_descending, | |
| order_by, | |
| }).filter(([_, value]) => value != null), | |
| ), |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
can be merged without the backend being deployed first