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/getIPFSHash/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'api/routes/getIPFSHash/index.js') diff --git a/api/routes/getIPFSHash/index.js b/api/routes/getIPFSHash/index.js index f412c80..4fc8d69 100644 --- a/api/routes/getIPFSHash/index.js +++ b/api/routes/getIPFSHash/index.js @@ -41,7 +41,8 @@ function fetchIPFShash(zblock, res) } }; -module.exports = (req, res) => { +function getIPFSHash(req, res) +{ var args = req.url.split("/"); if ( (args[2] === 'ipfs_hash') && args[3] && typeof args[3] === "string" && args[3].length === 46 ){ regex= /Qm[A-Za-z0-9]{44}/; @@ -69,3 +70,4 @@ module.exports = (req, res) => { res.end(JSON.stringify({error:"Invalid data: no valid zblock was provided"})); } } +module.exports = getIPFSHash; -- cgit v1.2.3