status-dev-cli
Advanced tools
Comparing version 3.0.1 to 3.0.2
10
cli.js
@@ -28,6 +28,2 @@ #!/usr/bin/env node | ||
function encodeObject(obj) { | ||
return fromAscii(JSON.stringify(obj)); | ||
} | ||
function makeSubscription(client, watch, relativePath, contactData) { | ||
@@ -60,3 +56,3 @@ sub = { | ||
url = "http://" + (cli.ip || defaultIp) + ":5561/dapp-changed"; | ||
child.execSync("curl -X POST -H \"Content-Type: application/json\" -d '{\"encoded\": \"" + contactData + "\"}' " + url); | ||
child.execSync("curl -X POST -H \"Content-Type: application/json\" -d '{\"encoded\": \"" + fromAscii(contactData) + "\"}' " + url); | ||
@@ -67,3 +63,3 @@ request({ | ||
json: true, | ||
body: { encoded: contactData } | ||
body: { encoded: fromAscii(contactData) } | ||
}, function (error, response, body) { | ||
@@ -206,3 +202,3 @@ if (error) { | ||
resp.relative_path, | ||
encodeObject(contactData) | ||
contactData | ||
); | ||
@@ -209,0 +205,0 @@ } |
{ | ||
"name": "status-dev-cli", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "CLI for Status", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
12792
248