From ae9726f747b2ec3e5805d03ef04ad47cb7628315 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Mon, 10 Jun 2024 05:08:59 +0300 Subject: Refactoring --- api/index.js | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'api/index.js') diff --git a/api/index.js b/api/index.js index cb84d25..9bd064b 100755 --- a/api/index.js +++ b/api/index.js @@ -88,44 +88,7 @@ const routes = require('./routes'); //Routes.provideTheAppHere(app); app.use('/', routes); -/* - * After NS validation went through we examine the return code - * of the application that run the test. - * - * Returns: - * - error on failure - * - on success we process with addNSEntriesToFile() - * - */ -function continuethingsNS(validitycode,sh,res,gotit){ - if (validitycode === 0){ - var entry = { - zchain: sh, - latest: JSON.parse(gotit).Path.replace('/ipfs/','') - }; - addNSEntriesToFile(entry,res); - } else { - res.send({error:"Invalid data"}); - } -} -/* - * After validation went through we examine the return code - * of the application that run the test. - * - * Returns : - * - error on failure - * - on success we process with addEntriesToFile() - * - */ -function continuethings(exitcode,sh,res){ - if (exitcode === 0){ - var entry = {zblock:sh}; - addEntriesToFile(entry,res); - } else { - res.send({error:"Invalid data"}); - } -} /* * Adds a latest resolved IPFS path for a given IPNS link -- cgit v1.2.3