diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-17 10:50:33 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-18 15:42:20 +0100 |
commit | 1174a8479ab9ee47b3305d668fe757435057a298 (patch) | |
tree | 6d5e4702536c0d4b77c06ecab9e3db65c00d59d8 /server/controllers/api/jobs.ts | |
parent | 6139124c673af2af02032905544909a2583dda2b (diff) | |
download | PeerTube-1174a8479ab9ee47b3305d668fe757435057a298.tar.gz PeerTube-1174a8479ab9ee47b3305d668fe757435057a298.tar.zst PeerTube-1174a8479ab9ee47b3305d668fe757435057a298.zip |
Set sort refractoring
Diffstat (limited to 'server/controllers/api/jobs.ts')
-rw-r--r-- | server/controllers/api/jobs.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/jobs.ts b/server/controllers/api/jobs.ts index d9d6030a4..180a3fca6 100644 --- a/server/controllers/api/jobs.ts +++ b/server/controllers/api/jobs.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { UserRight } from '../../../shared/models/users' | 2 | import { UserRight } from '../../../shared/models/users' |
3 | import { getFormattedObjects } from '../../helpers/utils' | 3 | import { getFormattedObjects } from '../../helpers/utils' |
4 | import { asyncMiddleware, authenticate, ensureUserHasRight, jobsSortValidator, setJobsSort, setPagination } from '../../middlewares' | 4 | import { asyncMiddleware, authenticate, ensureUserHasRight, jobsSortValidator, setDefaultSort, setPagination } from '../../middlewares' |
5 | import { paginationValidator } from '../../middlewares/validators' | 5 | import { paginationValidator } from '../../middlewares/validators' |
6 | import { JobModel } from '../../models/job/job' | 6 | import { JobModel } from '../../models/job/job' |
7 | 7 | ||
@@ -12,7 +12,7 @@ jobsRouter.get('/', | |||
12 | ensureUserHasRight(UserRight.MANAGE_JOBS), | 12 | ensureUserHasRight(UserRight.MANAGE_JOBS), |
13 | paginationValidator, | 13 | paginationValidator, |
14 | jobsSortValidator, | 14 | jobsSortValidator, |
15 | setJobsSort, | 15 | setDefaultSort, |
16 | setPagination, | 16 | setPagination, |
17 | asyncMiddleware(listJobs) | 17 | asyncMiddleware(listJobs) |
18 | ) | 18 | ) |