JavaScript Node.js Basics Building a Command Line Application Capturing Command Line Arguments

Erwan EL
Erwan EL
7,668 Points

Not updated profiles

Nothing to do with the code which is working fine but why in my case the profiles are not updated into the node prompt. I actually have more points in my treehouse account.

2 Answers

Steven Parker
Steven Parker
173,812 Points

The forum is a great place to get help from other students, but may not be the most expedient (or even certain) way to contact the staff.

For account issues, contact the staff directly as described on the Support page.

Nate Baker
Nate Baker
17,246 Points

Steven -

I actually wonder if this is a code question. I was running into the same problem. No matter the username I passed as an argument, I always received "(username) has 90 total badge(s) and 41 points in JavaScript"

This was simply an oversight as I was not interpolating username in the https GET request.

const request = https.get(`https://teamtreehouse.com/username.json`, response => ...

I should have interpolated username and in so doing the GET request should read:

const request = https.get(`https://teamtreehouse.com/${username}`, response => ...

After updating this, I received the correct badge count and JavaScript points.

Just a heads up for anyone running into the same issue.

Steven Parker
Steven Parker
173,812 Points

Someone was being funny when they created an account named "username". They might not have realized the potential for confusion that had (or maybe they did!).