bitbucket-server-nodejs
Advanced tools
Comparing version 2.12.0 to 2.12.1
@@ -10,3 +10,2 @@ 'use strict'; | ||
var projects = require('./projects')(client); | ||
var allRepos = []; | ||
@@ -18,4 +17,5 @@ return { | ||
getAll: function (options) { | ||
getAll: function (options, allRepos) { | ||
var self = this; | ||
allRepos = allRepos || []; | ||
options = options || {}; | ||
@@ -25,3 +25,2 @@ | ||
.then(function (repos) { | ||
allRepos = _.concat(allRepos, repos.values); | ||
@@ -35,8 +34,7 @@ if (!repos.isLastPage) { | ||
return self.getAll(options); | ||
return self.getAll(options, _.concat(allRepos, repos.values)); | ||
} else { | ||
return _.concat(allRepos, repos.values) | ||
} | ||
}) | ||
.then(function () { | ||
return allRepos; | ||
}); | ||
}, | ||
@@ -43,0 +41,0 @@ |
@@ -12,3 +12,3 @@ { | ||
], | ||
"version": "2.12.0", | ||
"version": "2.12.1", | ||
"author": "Mark Massoud <npm@markmssd.com>", | ||
@@ -15,0 +15,0 @@ "repository": { |
@@ -41,3 +41,3 @@ var assert = require('assert'); | ||
bitbucketClient.repos.getAll(options) | ||
bitbucketClient.repos.getAll(options, []) | ||
.then(function (repos) { | ||
@@ -44,0 +44,0 @@ // Assert it contains the right ?start= argument |
Sorry, the diff of this file is not supported yet
75987
1793