Skip to content

Commit 9abd0a1

Browse files
committed
fix(provider): reverting gh 155
authorize decorator to be used inside method metadata GH-155
1 parent 2672220 commit 9abd0a1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/decorators/authorize.decorator.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ export function authorize(metadata: AuthorizationMetadata) {
4040
meta.spec = specPreprocessor(target, propertyKey, metadata, meta.spec);
4141
Reflector.deleteMetadata(OAI3KEY_METHODS, target, propertyKey);
4242
Reflector.defineMetadata(OAI3KEY_METHODS, meta, target, propertyKey);
43+
authorizedecorator(target, propertyKey, descriptor);
4344
}
44-
// authorization should work even if no method metadata is present
45-
authorizedecorator(target, propertyKey, descriptor);
4645
};
4746

4847
return authorizationWithMetadata;

0 commit comments

Comments
 (0)