Skip to content

Commit

Permalink
fix(code-gen): fix regression
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkdev98 committed Oct 10, 2024
1 parent 88a7fea commit 138b431
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/code-gen/src/router/js-koa.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,11 @@ type _Context = import("koa").ParameterizedContext<{}, {
fileBlockEnd(file);
}

fileWrite(file, `await ${group}Handlers.${route.name}(ctx as any);`);
if (file.relativePath.endsWith(".ts")) {
fileWrite(file, `await ${group}Handlers.${route.name}(ctx as any);`);
} else {
fileWrite(file, `await ${group}Handlers.${route.name}(ctx);`);
}

if (route.response) {
fileWrite(
Expand Down

0 comments on commit 138b431

Please sign in to comment.