Made a functioning solution to change /json output, but not accepted by FCC

Tell us what’s happening:
I made a functioning solution, but because it doesn’t “tell the GET /json route handler” to “transform” the solution (i instead used a variable which i change using a conditional) it isnt acepted. What does it mean to “tell the Get route handler to transform the message”. I tried adressing the variable the get route handler is under (in my code, this would be messageSender) but that didn’t work.

Your code so far
https://repl.it/talk/share/Boilerplate-sharing/115866

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36.

Challenge: Use the .env File

Link to the challenge:

The route handler is the anonymous function here:

app.get("/json", () => { ... here ... })

Maybe it’s saying you need to handle the transform inside that function. Your current solution has “holder” in the main scope block then passes it down to the function.

1 Like

Thanks yet again for steering me in the right direction! I was very stuck and frustrated but I understand what they mean more now. Would’ve taken me way too long without ya.

1 Like