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

Misplacing upcoming launches if sort order is set to "desc" #107

Closed
about-future opened this issue Jun 30, 2018 · 4 comments
Closed

Misplacing upcoming launches if sort order is set to "desc" #107

about-future opened this issue Jun 30, 2018 · 4 comments
Assignees

Comments

@about-future
Copy link

Hi guys,

When trying to get a list of all launches, using this url "https://api.spacexdata.com/v2/launches/all" and adding sort order is set as "desc", the returned list is missing all upcoming launches.
https://api.spacexdata.com/v2/launches/all?order=desc

If the sort order is set as "asc", everything is fine and returns the entire list of launches.
https://api.spacexdata.com/v2/launches/all?order=asc

Hope my feedback helps. Thank you!

@about-future
Copy link
Author

Correction... it's not missing the upcoming launches, but on "desc" case sets them at the end of the list, even if the sort order was correctly set. Sorry for the miss information!

@about-future about-future changed the title Missing upcoming launches if sort order is set to "desc" Misplacing upcoming launches if sort order is set to "desc" Jun 30, 2018
@jakewmeyer jakewmeyer self-assigned this Jun 30, 2018
@jakewmeyer jakewmeyer added the Bug label Jun 30, 2018
@jakewmeyer
Copy link
Member

jakewmeyer commented Jun 30, 2018

Looks like a json concatenation issue. All the lunches are there, they were just added to the bottom by default. Working on a solution

@jakewmeyer
Copy link
Member

Fix is live 👍 Just needed to add a condition to check the order before concatenating the response

@about-future
Copy link
Author

Thank you, Jake!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants