diff options
author | Chocobozzz <me@florianbigard.com> | 2019-10-21 14:50:55 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-10-21 15:03:28 +0200 |
commit | d5d9b6d7bfb7e9426b6462f7fdf285df39eea820 (patch) | |
tree | aa21a16be3df94b5c6fd264d1090ed9ac7c94a79 /server/controllers | |
parent | f6e0de3f48993b2c0ef9bd2c24d2d7443acc6ace (diff) | |
download | PeerTube-d5d9b6d7bfb7e9426b6462f7fdf285df39eea820.tar.gz PeerTube-d5d9b6d7bfb7e9426b6462f7fdf285df39eea820.tar.zst PeerTube-d5d9b6d7bfb7e9426b6462f7fdf285df39eea820.zip |
Update server dependencies
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/jobs.ts | 4 | ||||
-rw-r--r-- | server/controllers/bots.ts | 12 |
2 files changed, 5 insertions, 11 deletions
diff --git a/server/controllers/api/jobs.ts b/server/controllers/api/jobs.ts index c19596dde..1fa662349 100644 --- a/server/controllers/api/jobs.ts +++ b/server/controllers/api/jobs.ts | |||
@@ -36,8 +36,8 @@ export { | |||
36 | 36 | ||
37 | // --------------------------------------------------------------------------- | 37 | // --------------------------------------------------------------------------- |
38 | 38 | ||
39 | async function listJobs (req: express.Request, res: express.Response, next: express.NextFunction) { | 39 | async function listJobs (req: express.Request, res: express.Response) { |
40 | const state: JobState = req.params.state | 40 | const state = req.params.state as JobState |
41 | const asc = req.query.sort === 'createdAt' | 41 | const asc = req.query.sort === 'createdAt' |
42 | 42 | ||
43 | const jobs = await JobQueue.Instance.listForApi(state, req.query.start, req.query.count, asc) | 43 | const jobs = await JobQueue.Instance.listForApi(state, req.query.start, req.query.count, asc) |
diff --git a/server/controllers/bots.ts b/server/controllers/bots.ts index e25d9c21b..ed1040176 100644 --- a/server/controllers/bots.ts +++ b/server/controllers/bots.ts | |||
@@ -2,7 +2,6 @@ import * as express from 'express' | |||
2 | import { asyncMiddleware } from '../middlewares' | 2 | import { asyncMiddleware } from '../middlewares' |
3 | import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../initializers/constants' | 3 | import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../initializers/constants' |
4 | import * as sitemapModule from 'sitemap' | 4 | import * as sitemapModule from 'sitemap' |
5 | import { logger } from '../helpers/logger' | ||
6 | import { VideoModel } from '../models/video/video' | 5 | import { VideoModel } from '../models/video/video' |
7 | import { VideoChannelModel } from '../models/video/video-channel' | 6 | import { VideoChannelModel } from '../models/video/video-channel' |
8 | import { AccountModel } from '../models/account/account' | 7 | import { AccountModel } from '../models/account/account' |
@@ -39,15 +38,10 @@ async function getSitemap (req: express.Request, res: express.Response) { | |||
39 | urls: urls | 38 | urls: urls |
40 | }) | 39 | }) |
41 | 40 | ||
42 | sitemap.toXML((err, xml) => { | 41 | const xml = sitemap.toXML() |
43 | if (err) { | ||
44 | logger.error('Cannot generate sitemap.', { err }) | ||
45 | return res.sendStatus(500) | ||
46 | } | ||
47 | 42 | ||
48 | res.header('Content-Type', 'application/xml') | 43 | res.header('Content-Type', 'application/xml') |
49 | res.send(xml) | 44 | res.send(xml) |
50 | }) | ||
51 | } | 45 | } |
52 | 46 | ||
53 | async function getSitemapVideoChannelUrls () { | 47 | async function getSitemapVideoChannelUrls () { |