0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-06 22:40:26 -05:00

Add a query parameter "local" to the search method of storage to allow listing only local packages

This commit is contained in:
Yannick Galatol 2014-12-12 17:19:23 +01:00 committed by Alex Kocharin
parent 76bdc74670
commit ea50f3d3ed

View file

@ -382,7 +382,7 @@ Storage.prototype.search = function(startkey, options, callback) {
function remote_search() {
var uplink = self.uplinks[uplinks[i]]
if (!uplink) {
if (options.req.query.local !== undefined || !uplink) {
return merge_with_local_packages(null, null, {})
}
self.uplinks[uplinks[i]].request({