You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
@CurrentUser
and@Authorized
does@CurrentUser
returns aUserModel
if it exists,undefined
otherwise@Authorized
does nothing if user is authorized, returns an Unauthorized exception otherwise@Authorized
follows this: https://github.com/typestack/routing-controllers#authorized-decorator@OptionalAuthorized
middleware as wellThe text was updated successfully, but these errors were encountered: