Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add /variants #46

Merged
merged 1 commit into from
Mar 5, 2018
Merged

add /variants #46

merged 1 commit into from
Mar 5, 2018

Conversation

gdams
Copy link
Member

@gdams gdams commented Mar 5, 2018

This PR adds /variants allowing users to view all available variants

closes: #45

@gdams gdams requested a review from karianna March 5, 2018 20:52
Copy link
Member

@karianna karianna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gdams let me know if I'm talking rubbish here. I am not a Node developer :-)

@@ -62,6 +63,20 @@ module.exports = function(req, res) {
request('https://adoptopenjdk.net/dist/json/config.json', function(error, response, body) {
if (!error && response.statusCode == 200) {
platforms = JSON.parse(body).platforms;
variants = JSON.parse(body).variants;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good logic-wise but I'm wondering if it's time for an extract and refactor for this function. I'm inherently suspicious of any JS that gets close to 100 LOC :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha, okay.... I'll land this PR for now an we can look at a refactor later on

@gdams gdams merged commit 31822f5 into AdoptOpenJDK:master Mar 5, 2018
@gdams gdams deleted the variants branch March 5, 2018 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Listing variants?
2 participants