Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Events endpoint returns unsorted list of events. #90

Closed
tasomaniac opened this issue May 31, 2016 · 7 comments
Closed

Events endpoint returns unsorted list of events. #90

tasomaniac opened this issue May 31, 2016 · 7 comments

Comments

@tasomaniac
Copy link
Member

In Frisbee, we realized that the events endpoint returns the list unsorted. I think it is the order that they are stored in the db.

For example in this endpoint, you can see that the location of the 6th entry is wrong.

https://hub.gdgx.io/api/v1/chapters/115635340252753847571/events/2016-03-01T13:05:41.526+01:00/2017-05-31T13:05:41.526+02:00

@Splaktar
Copy link
Contributor

You can tell it which field to sort on in the request. Unfortunately this isn't documented (should be an open issue). Let me look...

@tasomaniac
Copy link
Member Author

We can definitely use it but by default for events, the date should be the default field to sort.

@Splaktar
Copy link
Contributor

Yep, #85 has a sorting example.

@tasomaniac
Copy link
Member Author

Should we close this then? Or does it worth to have a default sorting with date field?

@Splaktar
Copy link
Contributor

The default for all APIs is how the database returns the data, usually insertion order.

@tasomaniac
Copy link
Member Author

So it is something not possible in the current structure.

@Splaktar
Copy link
Contributor

It's possible, but most likely undesirable since it would remove the ability to get the current behavior and just force the behavior that is already supported via the sort API.

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

No branches or pull requests

2 participants