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/accounts.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/accounts.ts')
-rw-r--r-- | server/controllers/api/accounts.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/accounts.ts b/server/controllers/api/accounts.ts index aded581a5..3bc929db8 100644 --- a/server/controllers/api/accounts.ts +++ b/server/controllers/api/accounts.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { getFormattedObjects } from '../../helpers/utils' | 2 | import { getFormattedObjects } from '../../helpers/utils' |
3 | import { asyncMiddleware, paginationValidator, setAccountsSort, setPagination } from '../../middlewares' | 3 | import { asyncMiddleware, paginationValidator, setDefaultSort, setPagination } from '../../middlewares' |
4 | import { accountsGetValidator, accountsSortValidator } from '../../middlewares/validators' | 4 | import { accountsGetValidator, accountsSortValidator } from '../../middlewares/validators' |
5 | import { AccountModel } from '../../models/account/account' | 5 | import { AccountModel } from '../../models/account/account' |
6 | 6 | ||
@@ -9,7 +9,7 @@ const accountsRouter = express.Router() | |||
9 | accountsRouter.get('/', | 9 | accountsRouter.get('/', |
10 | paginationValidator, | 10 | paginationValidator, |
11 | accountsSortValidator, | 11 | accountsSortValidator, |
12 | setAccountsSort, | 12 | setDefaultSort, |
13 | setPagination, | 13 | setPagination, |
14 | asyncMiddleware(listAccounts) | 14 | asyncMiddleware(listAccounts) |
15 | ) | 15 | ) |