Skip to content

Commit ff8aad0

Browse files
committed
Minor improvement to presentation of JS call params
1 parent 2ecda9f commit ff8aad0

File tree

1 file changed

+2
-1
lines changed
  • mopidy_api_explorer/static/js

1 file changed

+2
-1
lines changed

mopidy_api_explorer/static/js/app.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ Handlebars.registerHelper("apiMethodCurlCall", function(apiMethod) {
6363
Handlebars.registerHelper("apiMethodJsCall", function(apiMethod) {
6464
let call = "mopidy." + snakeToCamel(apiMethod.methodName.replace("core.", ""));
6565
if (Object.keys(apiMethod.methodData.params).length > 0) {
66-
call += `(${JSON.stringify(apiMethod.methodData.params)})`;
66+
const paramsStr = JSON.stringify(apiMethod.methodData.params).replace(/":/g, '": ').replace(/,"/g, ', "');
67+
call += `(${paramsStr})`;
6768
} else {
6869
call += "()";
6970
}

0 commit comments

Comments
 (0)