Fix bug in dartgen: Increase the processing logic when route.RequestType is empty

This commit is contained in:
zhoumingji
2023-03-04 11:39:29 +08:00
committed by Kevin Wan
parent b41ccc5992
commit 97ada59175
2 changed files with 5 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ import '../data/{{with .Service}}{{.Name}}{{end}}.dart';
///
/// request: {{with .RequestType}}{{.Name}}{{end}}
/// response: {{with .ResponseType}}{{.Name}}{{end}}
Future {{normalizeHandlerName .Handler}}(
Future {{normalizeHandlerName .Handler}}(
{{if hasUrlPathParams $Route}}{{extractPositionalParamsFromPath $Route}},{{end}}
{{if ne .Method "get"}}{{with .RequestType}}{{.Name}} request,{{end}}{{end}}
{Function({{with .ResponseType}}{{.Name}}{{end}})? ok,