I see several posts per week where users new to the backend challenges fail to submit the base url of the challenge app. For example, the user might submit https://some-url.com/json
instead of just https://some-url.com
. Why not just strip off everything except for the base url when the Submit button is clicked? It could also replace the submitted url with the base url, so the user can see just the base url in the input.
The issue is when Campers (myself included) host projects under the same domain:
https://shaunshamilton.github.io/project-1
https://shaunshamilton.github.io/project-2
https://shaunshamilton.github.io/project-3
That makes sense. However, you are an experienced developer. Most users are using replit for the challenges (was not really talking about the projects). Maybe if a replit is detected (from the domain name), then strip everything past the base url? If nothing else, a note could be added to the instructions at the end before the Solution Link section. Again, this would just be for the challenges.
I would be ok with this. It is an easy change to make/undo if need be.
One last thought: We would need to keep this in mind if we ever did have a challenge/lesson/project asking for a specific endpoint to be included.
The main point, is we want the user to see that the extra part is being stripped, so if the user submits with say /json
on the end, then it gets switched to the stripped version right before submital (or real-time as the user types), so it remains in the input box as the stripped version whether the code passes all the tests are not.
How about this: feat(client): warn endpoint url submission by ShaunSHamilton · Pull Request #49560 · freeCodeCamp/freeCodeCamp · GitHub
Just a warning - the link can still be submitted. At the end of the day, there is a placeholder that shows what Campers should expect to submit…