diff options
Diffstat (limited to 'server/controllers/api/jobs.ts')
-rw-r--r-- | server/controllers/api/jobs.ts | 2 |
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 | ||
38 | async function listJobs (req: express.Request, res: express.Response, next: express.NextFunction) { | 38 | async 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) |