We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4a4354 commit 42ff4e3Copy full SHA for 42ff4e3
mopidy_api_explorer/static/js/app.js
@@ -48,11 +48,14 @@ Handlebars.registerHelper("concat", function() {
48
49
Handlebars.registerHelper("apiMethodCurlCall", function(apiMethod) {
50
const cmd = {
51
- method: apiMethod.methodName,
52
jsonrpc: "2.0",
53
- params: apiMethod.methodData.params,
54
id: 1,
+ method: apiMethod.methodName,
55
};
+ if (Object.keys(apiMethod.methodData.params).length > 0) {
56
+ cmd.params = apiMethod.methodData.params;
57
+ }
58
+
59
return "curl -X POST -H 'Content-Type: application/json'" +
60
` -d '${JSON.stringify(cmd, null, 2)}' ` +
61
window.location.origin + "/mopidy/rpc";
0 commit comments