From 333864c5fe098b6993066d73b8d6d8e6fb358eb0 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Mon, 14 Apr 2025 16:54:13 +0300 Subject: [api] Removes unnecessary anonymous JS functions --- api/routes/getZChain/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'api/routes/getZChain') diff --git a/api/routes/getZChain/index.js b/api/routes/getZChain/index.js index 6df2d7f..934b436 100644 --- a/api/routes/getZChain/index.js +++ b/api/routes/getZChain/index.js @@ -7,7 +7,8 @@ const { spawn } = require('child_process'); * - A JSON array representing the nodes' arching-kaos-zchain * */ -module.exports = (req, res) => { +function getZChain(req, res) +{ const command = spawn("ak", ["zchain", "--crawl"]); response_string = ""; command.stdout.on("data", data => { @@ -27,3 +28,5 @@ module.exports = (req, res) => { console.log(`child process exited with code ${code}`); }); }; + +module.exports = getZChain; -- cgit v1.2.3