1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Move apicache in peertube

Allow us to upgrade to node 16
This commit is contained in:
Chocobozzz 2021-07-22 11:15:17 +02:00
parent 13e1337791
commit 20bafcb61b
No known key found for this signature in database
GPG key ID: 583A612D890159BE
15 changed files with 372 additions and 65 deletions

View file

@ -5,7 +5,7 @@ import { SitemapStream, streamToPromise } from 'sitemap'
import { VideoModel } from '../models/video/video'
import { VideoChannelModel } from '../models/video/video-channel'
import { AccountModel } from '../models/account/account'
import { cacheRoute } from '../middlewares/cache'
import { cacheRoute } from '../middlewares/cache/cache'
import { buildNSFWFilter } from '../helpers/express-utils'
import { truncate } from 'lodash'
@ -14,7 +14,7 @@ const botsRouter = express.Router()
// Special route that add OpenGraph and oEmbed tags
// Do not use a template engine for a so little thing
botsRouter.use('/sitemap.xml',
asyncMiddleware(cacheRoute()(ROUTE_CACHE_LIFETIME.SITEMAP)),
cacheRoute(ROUTE_CACHE_LIFETIME.SITEMAP),
asyncMiddleware(getSitemap)
)