Last active
January 3, 2020 10:44
-
-
Save jacob-jonkman/449f9ed8613854c9fad704ae7e1ab18d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function selectValidProjects(): Promise<Project[]> { | |
return request(listProjectOptions) | |
.then(response => JSON.parse(response).result.projects) | |
.then(projects => { | |
const projectsList: Project[] = []; | |
projects.forEach(project => { | |
if (!is_project_blacklisted(project)) { | |
projectsList.push({ | |
name: project['name'], | |
id: project['id'] | |
}); | |
} | |
}); | |
return projectsList; | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment