-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Hi,
from what I understand, there isn't an implementation for using Guards and Interceptors, which I am missing. I want to create a custom decorator like this:
@Router({ alias: 'reboot' })
@Roles([Role.FULL_ACCESS])
export class RebootBrowseRouter {
constructor(private readonly rebootBrowseService: RebootBrowseService) {}
@Query({
input: rebootBrowseParamsSchema,
output: rebootBrowseResponseSchema
})
async getList(@Input() params: RebootBrowseParams) {
return this.rebootBrowseService.getRebootServers(params);
}
}
But my issue is that middlewars don't have access to the decorator data (maybe I am wrong?). Is there any one of you who figured out how to do it?
Either by using global middleware/guard/interceptor or by using them in the @Roles decorator?
Thanks.
Metadata
Metadata
Assignees
Labels
No labels