Browse Source

Refactored minimizeRepositories()

pull/28/head
Peter Morgan 4 years ago
parent
commit
eed5f5af68
1 changed files with 6 additions and 8 deletions
  1. +6
    -8
      routes/api/v2.js

+ 6
- 8
routes/api/v2.js View File

@ -188,17 +188,15 @@ const getOrganizationMembers = async orgName => {
* *
* @param {*} repositories * @param {*} repositories
*/ */
function minimizeRepositories(repositories)
{
var rList = [];
for(var i = 0; i < repositories.length; i++)
{
const minimizeRepositories = repositories => {
let rList = [];
repositories.forEach(repo => {
rList.push(copyWithProperties(["name", "created_at", "homepage", rList.push(copyWithProperties(["name", "created_at", "homepage",
"description", "language", "forks", "watchers", "description", "language", "forks", "watchers",
"open_issues_count", "license", "html_url"], "open_issues_count", "license", "html_url"],
repositories[i]));
}
repo));
})
return rList; return rList;
} }

Loading…
Cancel
Save