Skip to content

Should be possible to interact with the query object during findById operations #23

@fatmatto

Description

@fatmatto

The findById method of the controller ignores the query objects making it impossible to interact with from outside. A common scenario where you might want to interact with the query is, for example, the following.

  • I want to fetch a resource by its id by calling: GET /pets/1234 where 1234 is its id.
  • I want to make sure that only the owner of the resource can access it, so I want to modify the default query { "id": "1234" } and turn it into { "owner":req.currentUser,"id":"1234" }

At the moment this is not possible, so we might need to modify the findById method of the controller in order to support it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions