From e2c154967690f835f168b775d4b82b9d097432a3 Mon Sep 17 00:00:00 2001 From: Duddino Date: Sat, 5 Nov 2022 11:09:25 +0100 Subject: [PATCH] Added result --- app.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index d3f0a43..d7a5d97 100644 --- a/app.js +++ b/app.js @@ -46,9 +46,8 @@ async function makeRpc(name, ...params){ params, }), }); - const text = await output.text(); - console.log(text); - return { status: 200, response: text }; + const obj = await output.json(); + return { status: 200, response: obj.result }; }catch(error){ if (error.errno === "ECONNREFUSED") { return { status: 503, response: "PIVX node was not responsive." };