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:
parent
13e1337791
commit
20bafcb61b
15 changed files with 372 additions and 65 deletions
|
@ -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)
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue