diff --git a/backend/src/index.ts b/backend/src/index.ts index 4839322d4..84be16fbc 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -265,7 +265,7 @@ class Server { .get(config.MEMPOOL.API_URL_PREFIX + 'statistics/1y', routes.$getStatisticsByTime.bind(routes, '1y')) .get(config.MEMPOOL.API_URL_PREFIX + 'statistics/2y', routes.$getStatisticsByTime.bind(routes, '2y')) .get(config.MEMPOOL.API_URL_PREFIX + 'statistics/3y', routes.$getStatisticsByTime.bind(routes, '3y')) - .get(config.MEMPOOL.API_URL_PREFIX + 'pools', routes.getPools) + .get(config.MEMPOOL.API_URL_PREFIX + 'pools', routes.$getPools) ; } diff --git a/backend/src/routes.ts b/backend/src/routes.ts index b7956cd64..00e2ceee0 100644 --- a/backend/src/routes.ts +++ b/backend/src/routes.ts @@ -532,9 +532,12 @@ class Routes { } } - public async getPools(req: Request, res: Response) { + public async $getPools(req: Request, res: Response) { try { let stats = await miningStats.$getPoolsStats(req.query.interval as string); + // res.header('Pragma', 'public'); + // res.header('Cache-control', 'public'); + // res.setHeader('Expires', new Date(Date.now() + 1000 * 300).toUTCString()); res.json(stats); } catch (e) { res.status(500).send(e instanceof Error ? e.message : e); diff --git a/frontend/src/app/components/pool-ranking/pool-ranking.component.html b/frontend/src/app/components/pool-ranking/pool-ranking.component.html index 78b6a45ba..757e11385 100644 --- a/frontend/src/app/components/pool-ranking/pool-ranking.component.html +++ b/frontend/src/app/components/pool-ranking/pool-ranking.component.html @@ -1,13 +1,12 @@