File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
templates/cli/lib/commands Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,11 @@ const {{ service.name | caseLower }}{{ method.name | caseUcfirst }} = async ({ {
55
55
payload['{{ parameter .name }}'] = filePath;
56
56
}
57
57
58
+ {% elseif parameter .type == ' object' %}
59
+ if (typeof {{ parameter .name | caseCamel | escapeKeyword }} !== 'undefined') {
60
+ payload['{{ parameter .name }}'] = JSON.parse({{ parameter .name | caseCamel | escapeKeyword }});
61
+ }
62
+
58
63
{% else %}
59
64
if (typeof {{ parameter .name | caseCamel | escapeKeyword }} !== 'undefined') {
60
65
payload['{{ parameter .name }}'] = {{ parameter .name | caseCamel | escapeKeyword }}{% if method .consumes [0 ] == " multipart/form-data" and ( parameter .type != " string" and parameter .type != " array" ) %}.toString(){% endif %};
You can’t perform that action at this time.
0 commit comments