-
Notifications
You must be signed in to change notification settings - Fork 1
chore: Add limit for pagination and flowDate #144
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
base: main
Are you sure you want to change the base?
Conversation
The default action is to increase the PATCH number of SEMVER. Set IGNORE-FOR-RELEASE if you want to skip SEMVER bump. BREAKING-CHANGE and NEW-RELEASE must be run from GH Actions section manually. |
The default action is to increase the |
This pull request does not contain a valid label. Please add one of the following labels: |
src/main/java/it/gov/pagopa/fdr/controller/interfaces/controller/IOrganizationsController.java
Outdated
Show resolved
Hide resolved
src/main/java/it/gov/pagopa/fdr/controller/interfaces/controller/IOrganizationsController.java
Outdated
Show resolved
Hide resolved
…ery param and added constraint to publishedGt
…ery param and added constraint to publishedGt and updated openapi
…7-limit # Conflicts: # src/test/java/it/gov/pagopa/fdr/controller/organizations/OrganizationsControllerTest.java # src/test/java/it/gov/pagopa/fdr/test/util/TestUtil.java
Instant now = Instant.now(); | ||
ZonedDateTime nowUtc = now.atZone(ZoneOffset.UTC); | ||
ZonedDateTime limitZoned = nowUtc.minusMonths(1); | ||
Instant defaultDate = limitZoned.toInstant(); |
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.
Can these 4 lines be compacted?
Instant now = Instant.now(); | ||
ZonedDateTime nowUtc = now.atZone(ZoneOffset.UTC); |
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.
As before
ZonedDateTime limitZoned = nowUtc.minus(relativeValue, relativeUnit); | ||
Instant limitDate = limitZoned.toInstant(); |
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.
As before
|
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.
LGTM 👍
List of Changes
flowDate
andpublishedGt
request params have now max 1 monthflowDate
andpublishedGt
request params default to previous month if not providedMotivation and Context
Added contraint to
GET /organizations/{organizationId}/fdrs
API to avoid performance issueHow Has This Been Tested?
Screenshots (if appropriate):
Types of changes
expected)
Checklist: