express-nodejs-app/src/decorators/controller.decorator.ts
Sambo Chea dd445a22c0
All checks were successful
continuous-integration/drone/push Build is passing
Task: Fixed and updated for export all functions for decorators
2021-09-15 20:17:30 +07:00

8 lines
236 B
TypeScript

import { MetadataKeys } from "../constants/metadata.keys"
export const Controller = (basePath: string): ClassDecorator => {
return (target: any) => {
Reflect.defineMetadata(MetadataKeys.BASE_PATH, basePath, target)
}
}