From ff331365c5c7ecb090bf8d32057e360626fa2cd5 Mon Sep 17 00:00:00 2001 From: Satinder Grewal Date: Wed, 22 Feb 2017 23:25:55 +1300 Subject: [PATCH] Revert "getcache API" This reverts commit 304ed2b1bcc7df4699fb8293c24cce37f1317ed5. --- routes/shepherd.js | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/routes/shepherd.js b/routes/shepherd.js index 222e9df..49b507e 100644 --- a/routes/shepherd.js +++ b/routes/shepherd.js @@ -89,16 +89,7 @@ shepherd.get('/appconf', function(req, res, next) { res.send(obj); }); -shepherd.post('/getcache', function(req, res, next) { - console.log(req.body.pubkey) - var obj = shepherd.getCache(req.body.pubkey); - console.log('displaying output of request') - console.log(obj); - res.send(obj); -}); - shepherd.post('/allcoins', function(req, res, next) { - console.log(req.body.sessionKey) var sessionKey = req.body.sessionKey, _obj = { 'msg': 'error', @@ -392,22 +383,6 @@ shepherd.loadLocalConfig = function() { } }; -shepherd.getCache = function(_key) { - console.log(_key); - if (fs.existsSync(iguanaDir + '/cache-'+_key+'.json')) { - var WalletCacheFile = fs.readFileSync(iguanaDir + '/cache-'+_key+'.json', 'utf8'); - console.log(WalletCacheFile) - console.log('Cache file found. serving it.'); - //return JSON.parse(WalletCacheFile); - return WalletCacheFile; - } else { - console.log('Cache file not found. yet.'); - return {"error":"file not found"}; - } -}; - - - shepherd.readDebugLog = function(fileLocation, lastNLines) { return new Promise( function(resolve, reject) {