Fix #1001: get only project user is member of (and return max of results)

Signed-off-by: Cédric Couralet <cedric.couralet@gmail.com>
This commit is contained in:
Cédric Couralet 2018-10-09 07:04:04 +00:00
parent 466dc9bc21
commit d7987def7f

View file

@ -591,7 +591,7 @@ function gitlabActionProjects (req, res, note) {
ret.accesstoken = user.accessToken ret.accesstoken = user.accessToken
ret.profileid = user.profileid ret.profileid = user.profileid
request( request(
config.gitlab.baseURL + '/api/' + config.gitlab.version + '/projects?access_token=' + user.accessToken, config.gitlab.baseURL + '/api/' + config.gitlab.version + '/projects?membership=yes&per_page=100&access_token=' + user.accessToken,
function (error, httpResponse, body) { function (error, httpResponse, body) {
if (!error && httpResponse.statusCode === 200) { if (!error && httpResponse.statusCode === 200) {
ret.projects = JSON.parse(body) ret.projects = JSON.parse(body)