| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1x 1x 13x 4x 2x 4x 3x | import { RouteParamtypes } from '@nestjs/common/enums/route-paramtypes.enum';
import { Paramtype } from '@nestjs/common';
export class ParamsTokenFactory {
public exchangeEnumForString(type: RouteParamtypes): Paramtype {
switch (type) {
case RouteParamtypes.BODY:
return 'body';
case RouteParamtypes.PARAM:
return 'param';
case RouteParamtypes.QUERY:
return 'query';
default:
return 'custom';
}
}
}
|