diff --git a/backend/src/index.ts b/backend/src/index.ts index 4b0466bf6..1f8575294 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -274,10 +274,10 @@ class Server { .get(config.MEMPOOL.API_URL_PREFIX + 'mining/pools/2y', routes.$getPools.bind(routes, '2y')) .get(config.MEMPOOL.API_URL_PREFIX + 'mining/pools/3y', routes.$getPools.bind(routes, '3y')) .get(config.MEMPOOL.API_URL_PREFIX + 'mining/pools/all', routes.$getPools.bind(routes, 'all')) + .get(config.MEMPOOL.API_URL_PREFIX + 'mining/pool/:poolId/blocks', routes.$getPoolBlocks) + .get(config.MEMPOOL.API_URL_PREFIX + 'mining/pool/:poolId/blocks/:height', routes.$getPoolBlocks) .get(config.MEMPOOL.API_URL_PREFIX + 'mining/pool/:poolId', routes.$getPool) - .get(config.MEMPOOL.API_URL_PREFIX + 'mining/pool/:poolId/:interval', routes.$getPool) - .get(config.MEMPOOL.API_URL_PREFIX + 'mining/pool-blocks/:poolId', routes.$getPoolBlocks) - .get(config.MEMPOOL.API_URL_PREFIX + 'mining/pool-blocks/:poolId/:height', routes.$getPoolBlocks); + .get(config.MEMPOOL.API_URL_PREFIX + 'mining/pool/:poolId/:interval', routes.$getPool); } if (config.BISQ.ENABLED) { diff --git a/frontend/src/app/services/api.service.ts b/frontend/src/app/services/api.service.ts index c1d42fd50..ec01a2a5c 100644 --- a/frontend/src/app/services/api.service.ts +++ b/frontend/src/app/services/api.service.ts @@ -139,9 +139,11 @@ export class ApiService { getPoolBlocks$(poolId: number, fromHeight: number): Observable { if (fromHeight !== undefined) { - return this.httpClient.get(this.apiBaseUrl + this.apiBasePath +`/api/v1/mining/pool-blocks/${poolId}/${fromHeight}`); + return this.httpClient.get(this.apiBaseUrl + this.apiBasePath + + `/api/v1/mining/pool/${poolId}/blocks/${fromHeight}`); } else { - return this.httpClient.get(this.apiBaseUrl + this.apiBasePath +`/api/v1/mining/pool-blocks/${poolId}`); + return this.httpClient.get(this.apiBaseUrl + this.apiBasePath + + `/api/v1/mining/pool/${poolId}/blocks`); } } }