File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { getMetadataArgsStorage } from "../index" ;
2
+ import { ControllerOptions } from "../decorator-options/ControllerOptions" ;
2
3
3
4
/**
4
5
* Registers an action to be executed when a request comes on a given route.
@@ -16,13 +17,14 @@ export function All(route?: string): Function;
16
17
* Registers an action to be executed when a request comes on a given route.
17
18
* Must be applied on a controller action.
18
19
*/
19
- export function All ( route ?: string | RegExp ) : Function {
20
+ export function All ( route ?: string | RegExp , options ?: ControllerOptions ) : Function {
20
21
return function ( object : Object , methodName : string ) {
21
22
getMetadataArgsStorage ( ) . actions . push ( {
22
23
type : "all" ,
23
24
target : object . constructor ,
24
25
method : methodName ,
25
- route : route
26
+ route : route ,
27
+ options,
26
28
} ) ;
27
29
} ;
28
30
}
You can’t perform that action at this time.
0 commit comments