diff --git a/src/decorator.ts b/src/decorator.ts index 9ff109b..0bfb288 100644 --- a/src/decorator.ts +++ b/src/decorator.ts @@ -407,7 +407,7 @@ export function Field(option?: FieldOption) { console.warn('Field can\'t be pagination enabled', propertyKey); return; } - setPaginationMetadata(target, propertyKey, methodDescriptor); + return setPaginationMetadata(target, propertyKey, methodDescriptor); } } @@ -454,7 +454,7 @@ export function Before(middleware: Middleware) { export function Pagination() { return function (target: any, propertyKey: any, methodDescriptor: any) { - setPaginationMetadata(target, propertyKey, methodDescriptor); + return setPaginationMetadata(target, propertyKey, methodDescriptor); } as Function; }