Skip to content

Commit df430a0

Browse files
authored
Merge pull request mongoose-os-libs#6 from nliviu/patch-1
Provide all arguments in RPC.call example
2 parents fe90665 + e02c497 commit df430a0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mjs_fs/api_rpc.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ let RPC = {
6060
// otherwise), err_msg (error messasge for non-0 error code), userdata. Example:
6161
//
6262
// ```javascript
63-
// RPC.call(RPC.LOCAL, 'Config.Save', {reboot: true}, function (resp, ud) {
64-
// print('Response:', JSON.stringify(resp));
63+
// RPC.call(RPC.LOCAL, 'Config.Save', {reboot: true}, function (resp, err_code, err_msg, ud) {
64+
// if (err_code !== 0) {
65+
// print("Error: (" + JSON.stringify(err_code) + ') ' + err_msg);
66+
// } else {
67+
// print('Result: ' + JSON.stringify(result));
68+
// }
6569
// }, null);
6670
// ```
6771
call: function(dst, name, args, cb, ud) {

0 commit comments

Comments
 (0)