Skip to content

Commit 6d62f75

Browse files
committed
added default sort
1 parent 92aa495 commit 6d62f75

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

assets/jscpd-badge.svg

Lines changed: 2 additions & 2 deletions
Loading

dist/functions/getItems/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/functions/getItems/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ const getItems: RequestHandlerFactory = <I extends Item>(
2323

2424
const sort = !_isNil(req.query.sort)
2525
? getJsonQueryParam(req.query, 'sort')
26-
: config.defaultSort;
27-
26+
: /* istanbul ignore next */ config.defaultSort;
27+
2828
const limit = getNumberQueryParam(
2929
req.query,
3030
'limit',
3131
config.defaultPaginationLimit
3232
);
33-
33+
3434
const createdFilter = config.createFilter({ filter, req, res });
3535

3636
const { cursor, items } = await config.service.getItems({

0 commit comments

Comments
 (0)