Rename v to validate

This commit is contained in:
Jerko Steiner 2019-08-27 20:34:02 +07:00
parent 9262cb636e
commit 0c867e916e

View File

@ -110,8 +110,8 @@ export const createRpcService = <T, M extends FunctionPropertyNames<T>>(
const validators = getValidatorsForMethod<Context>( const validators = getValidatorsForMethod<Context>(
(service as any), method) (service as any), method)
validators.forEach(v => { validators.forEach(validate => {
const success = v(context) const success = validate(context)
if (!success) { if (!success) {
throw createError(ERROR_INVALID_REQUEST, { throw createError(ERROR_INVALID_REQUEST, {
id, id,