Skip to content

Support for automatic class validation and CurrentUser check like routing-controllers #26

@gabekus

Description

@gabekus

For class validation
See https://github.com/typestack/routing-controllers#auto-validating-action-params

Routing-controllers uses @Body(), but this library uses @MessageBody(), so enabling validation during the bootstrap initialization would inject this function into the @MessageBody() decorator.

For current user checker
See https://github.com/typestack/routing-controllers#currentuser-decorator
Many people attach a session on the request object, so we could implement our own current user check that would have access to the io/socket instance, and access request.session.user from that request instead of using @SocketRequest() to access user

EDIT: It seems there's already a PR open with support for CurrentUser checker, what's the status on this? #23

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions