-
Notifications
You must be signed in to change notification settings - Fork 59
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
Get /organizations/{id} change the order for associated planters #243 #256
base: main
Are you sure you want to change the base?
Conversation
@@ -52,7 +52,7 @@ | |||
"express-validator": "^6.4.0", | |||
"joi": "^17.5.0", | |||
"knex": "^0.95.14", | |||
"loglevel": "^1.6.8", | |||
"loglevel": "^1.8.0", |
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.
:) @MundhadHarsh what's the motivation to upgrade this lib
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.
@dadiorchen it was not importing log from loglevel that's why I had to upgrade
@@ -26,7 +26,7 @@ function getByFilter( | |||
function getOrganizationLinks(organization) { | |||
const links = { | |||
featured_trees: `/trees?organization_id=${organization.id}&limit=20&offset=0`, | |||
associated_planters: `/planters?organization_id=${organization.id}&limit=20&offset=0`, | |||
associated_planters: `/planters?organization_id=${organization.id}&limit=20&offset=0&order_by=about`, |
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.
@MundhadHarsh did you test this feature, I mean, with this order_by parameter, the SQL will try to add corresponding phrase?
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.
No, I have not tested the feature. I made changes given in the description of #243
Should be tested first and confirmed to be working |
The endpoint: GET /organizations/{id} will return links which includes associated_planter currently, this link is: /planters?organization_id=${organization.id}&limit=20&offset=0 has been changed changed it to associated_planters:/organization_id=${organization.id}&limit=20&offset=0&order_by=about