diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-22 11:15:17 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-22 11:48:24 +0200 |
commit | 20bafcb61bee2a9a10a500908850c9a7d5e3c8c5 (patch) | |
tree | 18d0e8eb693b0fce88b21b282ea6f28836763fe6 /server/controllers/api | |
parent | 13e13377918b65c30b9334920fef4b43e70b964e (diff) | |
download | PeerTube-20bafcb61bee2a9a10a500908850c9a7d5e3c8c5.tar.gz PeerTube-20bafcb61bee2a9a10a500908850c9a7d5e3c8c5.tar.zst PeerTube-20bafcb61bee2a9a10a500908850c9a7d5e3c8c5.zip |
Move apicache in peertube
Allow us to upgrade to node 16
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/server/stats.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/server/stats.ts b/server/controllers/api/server/stats.ts index 3aea12450..397702548 100644 --- a/server/controllers/api/server/stats.ts +++ b/server/controllers/api/server/stats.ts | |||
@@ -2,12 +2,12 @@ import * as express from 'express' | |||
2 | import { StatsManager } from '@server/lib/stat-manager' | 2 | import { StatsManager } from '@server/lib/stat-manager' |
3 | import { ROUTE_CACHE_LIFETIME } from '../../../initializers/constants' | 3 | import { ROUTE_CACHE_LIFETIME } from '../../../initializers/constants' |
4 | import { asyncMiddleware } from '../../../middlewares' | 4 | import { asyncMiddleware } from '../../../middlewares' |
5 | import { cacheRoute } from '../../../middlewares/cache' | 5 | import { cacheRoute } from '../../../middlewares/cache/cache' |
6 | 6 | ||
7 | const statsRouter = express.Router() | 7 | const statsRouter = express.Router() |
8 | 8 | ||
9 | statsRouter.get('/stats', | 9 | statsRouter.get('/stats', |
10 | asyncMiddleware(cacheRoute()(ROUTE_CACHE_LIFETIME.STATS)), | 10 | cacheRoute(ROUTE_CACHE_LIFETIME.STATS), |
11 | asyncMiddleware(getStats) | 11 | asyncMiddleware(getStats) |
12 | ) | 12 | ) |
13 | 13 | ||