diff --git a/packages/http/src/interceptors/fields.interceptor.ts b/packages/http/src/interceptors/fields.interceptor.ts index e191e7bf..c4f7d5b6 100644 --- a/packages/http/src/interceptors/fields.interceptor.ts +++ b/packages/http/src/interceptors/fields.interceptor.ts @@ -13,8 +13,13 @@ export class FieldsInterceptor implements NestInterceptor { return next.handle(); } - const disableFieldsInterceptorMetadata = DecoratorUtils.getMethodDecorator(DisableFieldsInterceptorOptions, context.getHandler()); - if (disableFieldsInterceptorMetadata) { + const disableFieldsInterceptorMethodMetadata = DecoratorUtils.getMethodDecorator(DisableFieldsInterceptorOptions, context.getHandler()); + if (disableFieldsInterceptorMethodMetadata) { + return next.handle(); + } + + const disableFieldsInterceptorClassMetadata = DecoratorUtils.getClassDecorator(DisableFieldsInterceptorOptions, context.getClass()); + if (disableFieldsInterceptorClassMetadata) { return next.handle(); }