mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Update server dependencies
This commit is contained in:
parent
f6e0de3f48
commit
d5d9b6d7bf
17 changed files with 1197 additions and 1396 deletions
|
@ -2,7 +2,6 @@ import * as express from 'express'
|
|||
import { asyncMiddleware } from '../middlewares'
|
||||
import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../initializers/constants'
|
||||
import * as sitemapModule from 'sitemap'
|
||||
import { logger } from '../helpers/logger'
|
||||
import { VideoModel } from '../models/video/video'
|
||||
import { VideoChannelModel } from '../models/video/video-channel'
|
||||
import { AccountModel } from '../models/account/account'
|
||||
|
@ -39,15 +38,10 @@ async function getSitemap (req: express.Request, res: express.Response) {
|
|||
urls: urls
|
||||
})
|
||||
|
||||
sitemap.toXML((err, xml) => {
|
||||
if (err) {
|
||||
logger.error('Cannot generate sitemap.', { err })
|
||||
return res.sendStatus(500)
|
||||
}
|
||||
const xml = sitemap.toXML()
|
||||
|
||||
res.header('Content-Type', 'application/xml')
|
||||
res.send(xml)
|
||||
})
|
||||
res.header('Content-Type', 'application/xml')
|
||||
res.send(xml)
|
||||
}
|
||||
|
||||
async function getSitemapVideoChannelUrls () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue