Skip to content

Resolve query parameters to models #2

Description

@simplymichael

Resolve query parameters to the appropriate model instances. For example, after the implementation, a route like:

router.get("/{userId}", async (req, res) => {
    const user = await User.findByPk(req.params.userId);

    return user;
});

Should be written to the following and achieve the same result:

router.get("/{user}", (req, res) => {
    return user;
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions