Skip to content

Session Method Parameter Decorator #30

@MichalLytek

Description

@MichalLytek

Is the @Session decorator avaible?
I attach to req.session an user object after sucessfull authentication and use it in controler method to check if user is an owner of demanded object from database.
It would be nice to have :

@Get("/posts")
getAll(@Session("user") user: User) {
   return postsRepository.getAllByUser(user);
}

And don't have to parse request object by myself 😉

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featureIssues related to new features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions