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

Get /organizations/{id} change the order for associated planters #243 #256

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MundhadHarsh
Copy link

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

����.
@@ -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",
Copy link
Contributor

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

Copy link
Author

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`,
Copy link
Contributor

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?

Copy link
Author

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

@Kpoke
Copy link
Collaborator

Kpoke commented Nov 13, 2023

Should be tested first and confirmed to be working

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

3 participants