Skip to content

Commit

Permalink
Add @controller export to index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
przucidlo committed Aug 3, 2021
1 parent 439c101 commit 3cb5faf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/decorators/controller.decorator.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CONTROLLER_PATTERN_METADATA } from '../constants/decorators';

export function Controller(pattern: string): ClassDecorator {
export default function Controller(pattern: string): ClassDecorator {
return (target) => {
Reflect.defineMetadata(CONTROLLER_PATTERN_METADATA, pattern, target.prototype);
};
Expand Down
2 changes: 2 additions & 0 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export * from './decorators/create-param-decorator';
export { default as createParamDecorator } from './decorators/create-param-decorator';
export * from './decorators/use-middleware.decorator';
export { default as UseMiddleware } from './decorators/use-middleware.decorator';
export * from './decorators/controller.decorator';
export { default as Controller } from './decorators/controller.decorator';

export * from './middleware/internal/param-transformer.middleware';
export { default as ParamTransformerMiddleware } from './middleware/internal/param-transformer.middleware';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'reflect-metadata';
import { MessagePattern, UseMiddleware } from '../../../lib';
import Data from '../../../lib/decorators/data.decorator';
import { Controller } from '../../../lib/decorators/controller.decorator';
import Controller from '../../../lib/decorators/controller.decorator';
import { isHandlerParamMetadata } from '../../../lib/interfaces/handler-param-metadata.interface';
import { ControllerHandlersMetadataReader } from '../../../lib/metadata-readers/controller-handlers-metadata.reader';
import { MockMiddleware } from '../__mocks__/mock-middleware';
Expand Down

0 comments on commit 3cb5faf

Please sign in to comment.