Skip to content

Add route.controller.constructor.name and route.propertyKey methods in ctx state #1183

@praveenderin

Description

@praveenderin

Issue
Could not get controller and method name inside hooks. state in the Context object can have methods to get controller and method name.

Please add the following lines route.controller.constructor.name and route.propertyKey in the @foal/core/routes/get-response.js and set the values in the state object so that controller and method name can be accessed inside the hooks.

This will be helpful to handle controller and method specific access control.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions