My Api refused to pass the last test

Tell us what’s happening:
Describe your issue in detail here.
My Api is not passing the last test, and every time I run it, I noticed new inputs are automatically created in my database.

it submits this link into my database https://boilerplate-project-urlshortener-3.ayobamimichael.repl.co multiple times

I don’t know where I got it wrong.
Your project link(s)

solution: https://replit.com/@ayobamimichael/boilerplate-project-urlshortener-3

Your browser information:

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

Challenge: URL Shortener Microservice

Link to the challenge:

You don’t mention what the reason is that the test does not pass, but I noticed that if I put in the same website more than one it increments the “count”. When I did this challenge my code checked if a short url was already created for the website first, then if it was created returned the shot url previously created, else create a new short url and return the new short url.

That’s the problem, I don’t know the reason why it not passing the last test, yet my api checks the invalid and valid url properly and returns error message.

Thanks for your observations, finally solved the problem.

Blockquote
https://boilerplate-project-urlshortener-2.ayobamimichael.repl.co

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.