diff options
Diffstat (limited to 'api/routes/getAKNSKeyFromBase/index.js')
-rw-r--r-- | api/routes/getAKNSKeyFromBase/index.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/api/routes/getAKNSKeyFromBase/index.js b/api/routes/getAKNSKeyFromBase/index.js index 587314a..7da3d9b 100644 --- a/api/routes/getAKNSKeyFromBase/index.js +++ b/api/routes/getAKNSKeyFromBase/index.js @@ -35,7 +35,7 @@ function replyIfOkay(key, res) const base64String = key; const decodedHexString = decodeBase64ToHex(base64String); formatted_key = decodedHexString.toUpperCase(); - const command = spawn(program, ["-rk", `${formatted_key}`]); + const command = spawn(program, ["-rj", `${formatted_key}`]); var buffer = ""; command.stdout.on("data", data => { @@ -52,10 +52,7 @@ function replyIfOkay(key, res) if (code === 0){ buffer = buffer.trim() res.writeHead(200, {'Content-Type': 'application/json'}); - res.end(JSON.stringify({ - key:`${formatted_key}`, - resolved:`${buffer}` - })); + res.end(`${buffer}`); } else { res.writeHead(404, {'Content-Type': 'application/json'}); res.end(JSON.stringify({error:"unreachable"})); |