Files
Automata/packages/cli/src/decorators/RestController.ts
कारतोफ्फेलस्क्रिप्ट™ 845f0f9d20 refactor(core): Switch over all user-management routes to use decorators (#5115)
2023-01-27 11:19:47 +01:00

9 lines
285 B
TypeScript

/* eslint-disable @typescript-eslint/naming-convention */
import { CONTROLLER_BASE_PATH } from './constants';
export const RestController =
(basePath: `/${string}` = '/'): ClassDecorator =>
(target: object) => {
Reflect.defineMetadata(CONTROLLER_BASE_PATH, basePath, target);
};