For non Bitcoin network, run legacy API code, but keep the same endpoint

This commit is contained in:
nymkappa
2022-05-23 13:02:18 +02:00
parent 8f57272ea0
commit 88fba3f506
5 changed files with 50 additions and 10 deletions

View File

@@ -336,8 +336,8 @@ class Server {
}
this.app
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks', routes.getBlocks)
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks/:height', routes.getBlocks)
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks', routes.getBlocks.bind(routes))
.get(config.MEMPOOL.API_URL_PREFIX + 'blocks/:height', routes.getBlocks.bind(routes))
.get(config.MEMPOOL.API_URL_PREFIX + 'block/:hash', routes.getBlock);
if (config.MEMPOOL.BACKEND !== 'esplora') {