Skip to content

Commit b4bf77c

Browse files
committed
Fix issue after merging PR#329
1 parent 9b42abd commit b4bf77c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/decorator/All.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {getMetadataArgsStorage} from "../index";
2+
import { ControllerOptions } from "../decorator-options/ControllerOptions";
23

34
/**
45
* Registers an action to be executed when a request comes on a given route.
@@ -16,13 +17,14 @@ export function All(route?: string): Function;
1617
* Registers an action to be executed when a request comes on a given route.
1718
* Must be applied on a controller action.
1819
*/
19-
export function All(route?: string|RegExp): Function {
20+
export function All(route?: string|RegExp, options?: ControllerOptions): Function {
2021
return function (object: Object, methodName: string) {
2122
getMetadataArgsStorage().actions.push({
2223
type: "all",
2324
target: object.constructor,
2425
method: methodName,
25-
route: route
26+
route: route,
27+
options,
2628
});
2729
};
2830
}

0 commit comments

Comments
 (0)