Skip to content

Commit dde68f0

Browse files
authored
fix(provider): remove metadata check before authorization (#160)
authorization should work even if no method metadata is present GH-155
1 parent 901b418 commit dde68f0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/decorators/authorize.decorator.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ 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);
4443
}
44+
// authorization should work even if no method metadata is present
45+
authorizedecorator(target, propertyKey, descriptor);
4546
};
4647

4748
return authorizationWithMetadata;

0 commit comments

Comments
 (0)