Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(routes): update user_id retrieval logic #28

Merged
merged 1 commit into from
Nov 16, 2024
Merged

fix(routes): update user_id retrieval logic #28

merged 1 commit into from
Nov 16, 2024

Conversation

chimpdev
Copy link
Member

This pull request includes changes to the src/lib/express/routes/api/v1/users/[user_id]/storage/index.ts file to improve the handling of request parameters. The main changes involve switching from using query parameters to using route parameters for the user_id.

Changes to request parameter handling:

@chimpdev chimpdev self-assigned this Nov 16, 2024
Copy link

what-the-diff bot commented Nov 16, 2024

PR Summary

  • Interface Renamed for Better Clarity
    The previous RequestQuery interface has now been renamed to RequestParams. This name change will make the interface's purpose clearer, avoiding confusion in its usage.

  • Simplified Request Handler Signatures
    We've streamlined our request handler function signatures, by replacing the more complex, unreadable initial type Request<unknown, unknown, unknown, RequestQuery> with a more intuitive and straightforward Request<RequestParams>.

  • Improved Extraction Method for User Identification
    The method of extracting the 'user_id' from the request has been revamped. Instead of fetching it from the request.query, we are now retrieving it directly from the request.params. This change has been applied to both the get and del methods, and it should improve the accuracy and performance of our user identification process.

@chimpdev chimpdev added the Bug Issues related to bugs specifically in the project. label Nov 16, 2024
@chimpdev chimpdev merged commit 39eb711 into main Nov 16, 2024
2 checks passed
@chimpdev chimpdev deleted the patch branch November 16, 2024 06:46
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug Issues related to bugs specifically in the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant