File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
packages/cli/src/routeGeneration/templates Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,11 @@ export function RegisterRoutes(server: any) {
59
59
// ###########################################################################################################
60
60
{{ #each controllers }}
61
61
{{ #each actions }}
62
+ const args{{ ../name }} _{{ name }} : Record<string , TsoaRoute.ParameterSchema> = {
63
+ {{ #each parameters }}
64
+ {{ @key }} : {{{ json this }}} ,
65
+ {{ /each }}
66
+ };
62
67
server.route({
63
68
method: '{{ method }} ',
64
69
path: '{{ fullPath }} ',
@@ -92,15 +97,10 @@ export function RegisterRoutes(server: any) {
92
97
},
93
98
{{ /if }}
94
99
handler: {{ #if ../../iocModule }} async {{ /if }} function {{ ../name }} _{{ name }} (request: Request, h: ResponseToolkit) {
95
- const args: Record<string , TsoaRoute.ParameterSchema> = {
96
- {{ #each parameters }}
97
- {{ @key }} : {{{ json this }}} ,
98
- {{ /each }}
99
- };
100
100
101
101
let validatedArgs: any[] = [];
102
102
try {
103
- validatedArgs = templateService.getValidatedArgs({ args, request, h });
103
+ validatedArgs = templateService.getValidatedArgs({ args: args {{ ../name }} _ {{ name }} , request, h });
104
104
} catch (err) {
105
105
const error = err as any;
106
106
if (isBoom(error)) {
You can’t perform that action at this time.
0 commit comments