1
0
Fork 0
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:
Chocobozzz 2019-10-21 14:50:55 +02:00
parent f6e0de3f48
commit d5d9b6d7bf
No known key found for this signature in database
GPG key ID: 583A612D890159BE
17 changed files with 1197 additions and 1396 deletions

View file

@ -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 () {