Skip to content

paramsFromClient

Source Code | Documentation

See also: paramsForServer

Pass context.params from client to server. Server hook.

ts
  import { 
paramsFromClient
} from 'feathers-utils/hooks';

Type declaration

ts
export type paramsFromClientOptions = {
  /**
   * @default '_$client'
   */
  keyToHide?: string
}
/**
 * Pass `context.params` from client to server. Server hook.
 *
 * @see https://utils.feathersjs.com/hooks/params-from-client.html
 */
export declare const paramsFromClient: (
  whitelist: MaybeArray<string>,
  options?: paramsFromClientOptions,
) => (context: HookContext, next?: NextFunction) => any
ArgumentTypeDescription
whitelistMaybeArray<string>
optionsparamsFromClientOptions
typemethodsmulti
before, aroundallyes

Released under the MIT License.