Skip to content

Commit

Permalink
Add a query parameter "local" to the search method of storage to allo…
Browse files Browse the repository at this point in the history
…w listing only local packages
  • Loading branch information
Yannick Galatol authored and rlidwka committed Dec 14, 2014
1 parent 76bdc74 commit ea50f3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit ea50f3d

Please sign in to comment.