Migrate Yearly Reading Goals to FastAPI#11816
Merged
Conversation
cdrini
approved these changes
Feb 11, 2026
Collaborator
cdrini
left a comment
There was a problem hiding this comment.
Lgtm! Tested across account and nothing seemed to persist. Agree with @RayBB that this endpoint could benefit from splitting out into separate POST/PUT/DELETE endpoints, but this is fine for now.
This is suuuuuper exciting!!! Now that we have the get current user method working in fastapi, there's nothing blocking us from any endpoint basically being migrated??? 🥳
bhardwajparth51
added a commit
to bhardwajparth51/openlibrary
that referenced
this pull request
Feb 17, 2026
* get_current_user works from fastapi * migrate yearly reading goals to fastapi * cleanup tests * add json to tests * fix tests * format tests * remove integration test * remove excessive docs * remove current that's not needed
jimchamp
reviewed
Feb 19, 2026
| Returns the currently logged in user. None if not logged in. | ||
| """ | ||
| return web.ctx.site.get_user() | ||
| return site.get().get_user() |
Collaborator
There was a problem hiding this comment.
This has caused the preference migration script to fail. Other scripts that call get_current_user will almost certainly also fail w/o additional set-up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on: #11815
Closes #
This migrates reading goals as a first small proof of concept for getting user auth working in
siteTechnical
A good followup would be to split the POST endpoint into
POST, PUT (updates), and DELETE
Then update the UI to use it.
Testing
Screenshot
Stakeholders