From 9abd0a1e2c33f2d7377ab5f02b454faf1864e078 Mon Sep 17 00:00:00 2001 From: Yesha Mavani Date: Mon, 17 Nov 2025 10:50:00 +0530 Subject: [PATCH] fix(provider): reverting gh 155 authorize decorator to be used inside method metadata GH-155 --- src/decorators/authorize.decorator.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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;