setSlug
Fix slugs in URL, e.g. /stores/:storeId.
ts
import { setSlug } from 'feathers-utils/hooks';Type declaration
ts
/**
* Fix slugs in URL, e.g. /stores/:storeId.
*
* @see https://utils.feathersjs.com/hooks/set-slug.html
*/
export declare const setSlug: <H extends HookContext = HookContext>(
slug: string,
fieldName?: string,
) => (context: H, next?: NextFunction) => any| Argument | Type | Description |
|---|---|---|
| slug | string | |
| fieldName | string |
| type | methods | multi |
|---|---|---|
| before, after, around | all | yes |
