-
Notifications
You must be signed in to change notification settings - Fork 77
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
refactor(api): add user Depends for list api #766
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis pull request refactors several API endpoints by adding a user dependency to ensure that the user is authenticated before proceeding with the request. If the user is not authenticated, an HTTP 401 Unauthorized error is raised. Changes
|
params: PageParams[Task], | ||
user: Annotated[User | None, Depends(get_user)] = None, | ||
): | ||
if user is 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.
The addition of a user dependency and the subsequent check for user authentication is a critical change. It ensures that only authenticated users can access these endpoints, which is important for maintaining security and data integrity.
Codecov ReportAttention: Patch coverage is
|
No description provided.