Skip to content

Commit 138b431

Browse files
committed
fix(code-gen): fix regression
1 parent 88a7fea commit 138b431

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/code-gen/src/router/js-koa.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,11 @@ type _Context = import("koa").ParameterizedContext<{}, {
415415
fileBlockEnd(file);
416416
}
417417

418-
fileWrite(file, `await ${group}Handlers.${route.name}(ctx as any);`);
418+
if (file.relativePath.endsWith(".ts")) {
419+
fileWrite(file, `await ${group}Handlers.${route.name}(ctx as any);`);
420+
} else {
421+
fileWrite(file, `await ${group}Handlers.${route.name}(ctx);`);
422+
}
419423

420424
if (route.response) {
421425
fileWrite(

0 commit comments

Comments
 (0)