-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Added new endpoint to create a user list from a link. #9670
Added new endpoint to create a user list from a link. #9670
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #9670 +/- ##
==========================================
+ Coverage 16.06% 16.73% +0.67%
==========================================
Files 90 90
Lines 4769 4816 +47
Branches 832 840 +8
==========================================
+ Hits 766 806 +40
- Misses 3480 3487 +7
Partials 523 523 ☔ View full report in Codecov by Sentry. |
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.
Looking good! A few opportunities to simplify the code a bit.
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! Didn't test my small code fix, but I think it shouldn't cause any issues.
Tested on testing and it redirected correctly to the new endpoint!
Closes #9667
Currently, there's no endpoint to allow a logged-in user to add a new list without pattern-checking for their name. This poses a problem in the new Bulk Search feature, as it has to build the list in Vue, and getting access to the
web.ctx.site
variable (where that information is stored) is a non-trivial task in javascript. This PR sidesteps the problem, by creating a new endpoint in python to automatically redirect to the list creation endpoint for the currently logged in user.Technical
Testing
To test, perform a bulksearch and create a list. With the current structure of how the Bulk Search component works, it'll always try to link to the main Open Library page. This will be fixed in a future PR, but for now, just edit the
openlibrary.org
portion of the URL tolocalhost:8080
, or whatever you need for this particular test.Screenshot
Stakeholders
@cdrini