optional limit for recent projects

This commit is contained in:
Jake Howard 2016-03-11 20:47:12 +00:00
parent bcf45a9beb
commit 629977e351

View file

@ -27,9 +27,9 @@ export async function getProjects() {
return await request(url, GET, {}, CIToken).then(JSONify); 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 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( return await request(
url, url,
GET, GET,