0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

use req.query instead of manually parsing querystring

ref #65
This commit is contained in:
Alex Kocharin 2014-06-22 18:12:13 +04:00
parent 3f746eb7c8
commit 17d8ab7dcd

View file

@ -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)