From 629977e351ae51ee28be1ad7ac87a831ad7deb27 Mon Sep 17 00:00:00 2001 From: RealOrangeOne Date: Fri, 11 Mar 2016 20:47:12 +0000 Subject: [PATCH] optional limit for recent projects --- app/api/CircleCI.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/CircleCI.js b/app/api/CircleCI.js index e03614b..ce4ad45 100644 --- a/app/api/CircleCI.js +++ b/app/api/CircleCI.js @@ -27,9 +27,9 @@ export async function getProjects() { return await request(url, GET, {}, CIToken).then(JSONify); } -export async function getProjectRecentBuilds(user, repo) { +export async function getProjectRecentBuilds(user, repo, limit = 1) { const CIToken = await token.get(); - const url = endpoints.get('PROJECT_RECENTS').param({ user, repo }).query({ limit: 1}); + const url = endpoints.get('PROJECT_RECENTS').param({ user, repo }).query({ limit }); return await request( url, GET,