diff --git a/lib/index.js b/lib/index.js index b1aa0fb5f..a9a0562f8 100644 --- a/lib/index.js +++ b/lib/index.js @@ -172,9 +172,7 @@ module.exports = function(config_hash) { // searching packages app.get('/-/all/:package?', can('access'), function(req, res, next) { - var startkeyRegExp = /(.*)=([0-9]+)$/ - var startkey = startkeyRegExp.test(req.url) ? new Date(+req.url.replace(startkeyRegExp, '$2')) : 0 - storage.search(startkey, {req: req}, function(err, result) { + storage.search(req.param.startkey || 0, {req: req}, function(err, result) { if (err) return next(err) return res.send(result)