Tell us what’s happening:
Hello , I don’t know why my solution is not passing the 3 tests on this challenge (except the first one).
Does anyone have any idea why this is happening?
solution: boilerplate-project-urlshortener-5 - Replit
Challenge: Back End Development and APIs Projects - URL Shortener Microservice
Link to the challenge:
You are failing the 2nd and 3rd tests because you change the
index.html form from:
<input id="url_input" type="text" name="url" placeholder="https://www.freecodecamp.org/" />
<input id="url_input" type="text" name="original_url" placeholder="https://www.freecodecamp.org/" />
and the tests send a post request with a
url body parameter and not an
original_url body parameter.
For the last test, your app has zero url valiation to confirm that it is an http or https url. Plus, if I submit a url like
http://www.freecodecamp.org/learn, your returns an error when it instead should create a short url.
FYI - Using
count for the shortened url will not work if you restart your server. Everytime you restart the server,
count starts over at
0, so it will not reliably be able to get the original url from a shortened version if a restart happens in between.
I have made the changes. And it worked, now except for the last one, all the tests are completed. Thank you so much!
Now I am just not able to figure out what’s the issue for last test, might be an issue with regex.