Skip to content
Snippets Groups Projects
Commit d4e5e218 authored by Alexey Lunin's avatar Alexey Lunin
Browse files

Remove comma from generated penpal methods which don't have args in form

parent 4432eff1
No related branches found
No related tags found
1 merge request!30Fix error handling
......@@ -123,7 +123,13 @@ func buildViamAPI() string {
}
}
result += "ViamAPI.prototype." + packageStr + strings.Title(methodStr) + " = function(config, " + args + ") {\n" +
lastComma := ","
if args == "" {
lastComma = ""
}
result += "ViamAPI.prototype." + packageStr + strings.Title(methodStr) + " = function(config" + lastComma + args + ") {\n" +
" return axios.post(window.API_HOST + '" + packageStr + "/" + methodStr + "', {\n"
for i := 0; i < lenFields; i++ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment