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

Fix: ensure /api/books defaults to high_priority=False #8919

Conversation

scottbarnes
Copy link
Collaborator

Technical

This commit ensures /api/books/ passes high_priority=False, even if the endpoint called is not JSON. It appears that this API returns JSON even if one requests /api/books and not /api/books.json, and that conumers do so call the endpoint this way.

Previously, the endpoint only set high_priority=False as a default when accessed at /api/books.json.

Testing

For both /api/books and /api/books.json, visit the respective endpoints without specifying a priority, and observe high_priority=False, and then specify high_priority=true and observe that high_priority=True.

Screenshot

Stakeholders

@cdrini
@mekarpeles

This commit ensures `/api/books/` passes `high_priority=False`, even if
the endpoint called is _not_ JSON. It appears that this API returns JSON
even if one requests `/api/books` and not `/api/books.json`, and that
conumers do so call the endpoint this way.

Previously, the endpoint only set `high_priority=False` as a default
when accessing the JSON endpoint specifically.
@cdrini cdrini added Priority: 1 Do this week, receiving emails, time sensitive, . [managed] Patch Deployed This PR has been deployed to production independently, outside of the regular deploy cycle. labels Mar 20, 2024
@cdrini cdrini self-assigned this Mar 22, 2024
Copy link
Collaborator

@cdrini cdrini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@cdrini cdrini merged commit 000a0b4 into internetarchive:master Mar 22, 2024
3 checks passed
@scottbarnes scottbarnes deleted the fix/stop-api-books-from-defaulting-to-high-priority-is-true branch March 22, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Patch Deployed This PR has been deployed to production independently, outside of the regular deploy cycle. Priority: 1 Do this week, receiving emails, time sensitive, . [managed]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants