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

Event range request improvements #771

Merged
merged 5 commits into from
Dec 13, 2024

Conversation

carrythebanner
Copy link
Collaborator

@carrythebanner carrythebanner commented Jul 7, 2024

Updated how event ranges are handled:

So now:

  • Events endpoint pagination.range returns 1 as expected when startdate and enddate are the same date; fixes Events endpoint daysInRange() is off by 1 #567
  • Front end now defaults to 10 day range request as originally intended (previously fetched start date + 10, i.e. 11 days)

Also:

  • Added prev to Events endpoint pagination object, alongside next

@ionous
Copy link
Contributor

ionous commented Jul 10, 2024

re: range in general. i think i can see it either way: an additional number of days to see. or, the absolute number of days to fetch.
it might be worth adding a comment to the const EVENTS_RANGE to indicate that its the latter; and so therefore always needs to be 1 or greater. ( the server side could potentially get the same sort of comment on MaxRange, too; but maybe less important there because its able to validate > 0 when the request is submitted. )

@carrythebanner carrythebanner marked this pull request as ready for review November 26, 2024 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants