Skip to content
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

Create @Authorized decorator #55

Open
snajima opened this issue Nov 28, 2022 · 1 comment
Open

Create @Authorized decorator #55

snajima opened this issue Nov 28, 2022 · 1 comment

Comments

@snajima
Copy link
Contributor

snajima commented Nov 28, 2022

  • Separate what @CurrentUser and @Authorized does
@mateow99
Copy link
Contributor

the reason for forced unwrapping is for a method like getSavedPostsByUserId. @ currentUser is used but we need the userId to then leftJoin the saved column, which means the user we get will not be undefined, even though type inference says it might be. This is a case where we want to force unwrap the UserModel. Addressing this issue does not seem to address the need for the forced unwrapping of a (UserModel | undefined) type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants