aboutsummaryrefslogtreecommitdiff
path: root/api/routes
diff options
context:
space:
mode:
Diffstat (limited to 'api/routes')
-rw-r--r--api/routes/getNodeInfo/index.js9
-rw-r--r--api/routes/getZblock/index.js2
2 files changed, 2 insertions, 9 deletions
diff --git a/api/routes/getNodeInfo/index.js b/api/routes/getNodeInfo/index.js
index bd2c733..d87a3e7 100644
--- a/api/routes/getNodeInfo/index.js
+++ b/api/routes/getNodeInfo/index.js
@@ -1,13 +1,6 @@
const { spawn } = require('child_process');
const akLogMessage = require('../../lib/akLogMessage');
-/*
- * Gets the local latest zblock
- *
- * Returns:
- * - JSON object
- * { zlatest: "Qm..." }
- *
- */
+
module.exports = (req, res) => {
akLogMessage('INFO', `Incoming from [${req.socket._peername.address}]:${req.socket._peername.port} @ ${req.get('host')}${req._parsedOriginalUrl.pathname}`);
const command = spawn("ak-config", ["get-published"]);
diff --git a/api/routes/getZblock/index.js b/api/routes/getZblock/index.js
index a9ec02c..723df48 100644
--- a/api/routes/getZblock/index.js
+++ b/api/routes/getZblock/index.js
@@ -13,7 +13,7 @@ const config = require("../../config");
function fetchZblock(zblock, res){
regex= /Qm[A-Za-z0-9]{44}/;
if (regex.test(zblock)){
- const command = spawn("ak-zblock-cache",[zblock]);
+ const command = spawn("ak-zblock",["--cache",zblock]);
command.stdout.on("data", data => {
});