diff --git a/src/decorators/authorize.decorator.ts b/src/decorators/authorize.decorator.ts index 93364bb..f4a2808 100644 --- a/src/decorators/authorize.decorator.ts +++ b/src/decorators/authorize.decorator.ts @@ -40,9 +40,8 @@ export function authorize(metadata: AuthorizationMetadata) { meta.spec = specPreprocessor(target, propertyKey, metadata, meta.spec); Reflector.deleteMetadata(OAI3KEY_METHODS, target, propertyKey); Reflector.defineMetadata(OAI3KEY_METHODS, meta, target, propertyKey); + authorizedecorator(target, propertyKey, descriptor); } - // authorization should work even if no method metadata is present - authorizedecorator(target, propertyKey, descriptor); }; return authorizationWithMetadata;