Use getMetadata instead of getOwnMetadata
This commit is contained in:
parent
c7ab4fe387
commit
9262cb636e
@ -27,5 +27,5 @@ export function getValidatorsForMethod<Context>(
|
||||
target: any,
|
||||
method: string,
|
||||
): Array<Validate<Context>> {
|
||||
return Reflect.getOwnMetadata(ensureKey, target, method) || []
|
||||
return Reflect.getMetadata(ensureKey, target, method) || []
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ export const createRpcService = <T, M extends FunctionPropertyNames<T>>(
|
||||
}
|
||||
|
||||
const validators = getValidatorsForMethod<Context>(
|
||||
(service as any).__proto__, method)
|
||||
(service as any), method)
|
||||
|
||||
validators.forEach(v => {
|
||||
const success = v(context)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user