-
Notifications
You must be signed in to change notification settings - Fork 2
[backend] fix: Invalid url in share api endpoint #176
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
| @router.get("/{job_id}/results/{dataset_id}") | ||
| async def get_result( | ||
| job_id: JobId = Depends(validate_job_id), dataset_id: TaskId = Depends(validate_dataset_id), user: UserRead = Depends(current_active_user) | ||
| job_id: JobId = Depends(validate_job_id), dataset_id: TaskId = Depends(validate_dataset_id), user: UserRead = Depends(current_active_optional_user) |
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.
how does this differ from UserRead|None -- because thats what we used so far for like "non-mandatory" auth, haven't we? Should we replace that with this new one everywhere then?
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.
I believe current_active_user errors if not logged in
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.
Maybe I missed something with the | None?
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.
ok lets test it at some point (not required before merge), and have just one way of having optional-auth... because
# grep -R . -e 'UserRead | None' --include '*py' | wc -l
8
Description
FIx incorrect url in share endpoint
Contributor Declaration
By opening this pull request, I affirm the following: