Tell us what’s happening:
Describe your issue in detail here.
Am failing to pass the URL Shortener Microservice, i have passed all test except the url redirection test
When i check in my dev tools while submitting the test, somehow the freecodecamp test submissions prefix the duplicate route
/api/shorturl//api/shorturl/onfsM4dCWA
Your project link(s)
solution: https://replit.com/@christopherodhi/boilerplate-project-urlshortener-1
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36
Challenge: URL Shortener Microservice
Link to the challenge:
When you visit /api/shorturl/<short_url>
, you will be redirected to the original URL
you should return just short_url value
like 7K6QfMk1A
and your final response should look like this
{“original_url”:“https://www.google.com ”,“short_url”:“7K6QfMk1A”}
but you are returning
{“original_url”:“https://www.google.com ”,“short_url”:"/api/shorturl/7K6QfMk1A"}
so when fcc is testing api the visit this url https://boilerplate-project-urlshortener-1.christopherodhi.repl.co/api/shorturl/api/shorturl/7K6QfMk1A and result in test failure
fix this when you are saving newURL
Thanks man you’re a life saviour
system
Closed
June 12, 2022, 2:19am
4
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.