aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-02-27 16:57:53 +0100
committerChocobozzz <me@florianbigard.com>2018-02-27 16:57:53 +0100
commit2c29ad4f3b736912ae769a288c4795dce40e388d (patch)
treea74312c17b693159f682e3331210a65372571e6a /server/controllers/api
parent056aa7f2b4de1ef128a5fd35527de6dd7a9ebad1 (diff)
downloadPeerTube-2c29ad4f3b736912ae769a288c4795dce40e388d.tar.gz
PeerTube-2c29ad4f3b736912ae769a288c4795dce40e388d.tar.zst
PeerTube-2c29ad4f3b736912ae769a288c4795dce40e388d.zip
Fix job panel sorting in administration
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/jobs.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/controllers/api/jobs.ts b/server/controllers/api/jobs.ts
index 132d110ad..aa58a9144 100644
--- a/server/controllers/api/jobs.ts
+++ b/server/controllers/api/jobs.ts
@@ -36,7 +36,7 @@ export {
36// --------------------------------------------------------------------------- 36// ---------------------------------------------------------------------------
37 37
38async function listJobs (req: express.Request, res: express.Response, next: express.NextFunction) { 38async function listJobs (req: express.Request, res: express.Response, next: express.NextFunction) {
39 const sort = req.query.sort === 'createdAt' ? 'asc' : 'desc' 39 const sort = req.query.sort === 'createdAt' ? 'ASC' : 'DESC'
40 40
41 const jobs = await JobQueue.Instance.listForApi(req.params.state, req.query.start, req.query.count, sort) 41 const jobs = await JobQueue.Instance.listForApi(req.params.state, req.query.start, req.query.count, sort)
42 const total = await JobQueue.Instance.count(req.params.state) 42 const total = await JobQueue.Instance.count(req.params.state)