diff options
Diffstat (limited to 'server/middlewares/sort.ts')
-rw-r--r-- | server/middlewares/sort.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/middlewares/sort.ts b/server/middlewares/sort.ts index 5120804b3..6507aa5b8 100644 --- a/server/middlewares/sort.ts +++ b/server/middlewares/sort.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import 'express-validator' | 2 | import 'express-validator' |
3 | import { SortType } from '../helpers/utils' | 3 | import { SortType } from '../models/utils' |
4 | 4 | ||
5 | function setDefaultSort (req: express.Request, res: express.Response, next: express.NextFunction) { | 5 | function setDefaultSort (req: express.Request, res: express.Response, next: express.NextFunction) { |
6 | if (!req.query.sort) req.query.sort = '-createdAt' | 6 | if (!req.query.sort) req.query.sort = '-createdAt' |