Navigation Menu

Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Commit

Permalink
Turn off default limits
Browse files Browse the repository at this point in the history
  • Loading branch information
pfrazee committed Feb 13, 2021
1 parent 8fa006b commit 98b385b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -225,8 +225,8 @@ function json404 (res, e) {
}

function getListOpts (req) {
const opts = {limit: 10}
if (req.query.limit) opts.limit = Math.max(Math.min(req.query.limit, 100), 0)
const opts = {}
if (req.query.limit) opts.limit = req.query.limit
if (req.query.lt) opts.lt = req.query.lt
if (req.query.lte) opts.lte = req.query.lte
if (req.query.gt) opts.gt = req.query.gt
Expand Down

0 comments on commit 98b385b

Please sign in to comment.