fix: remove user stories and example usage

This commit is contained in:
Kris Koishigawa 2020-09-29 13:55:20 +09:00
parent b6e493db53
commit 76b242f36a
2 changed files with 1 additions and 16 deletions

View File

@ -1,10 +1,3 @@
# API Project: URL Shortener Microservice for freeCodeCamp # URL Shortener Microservice
[![Run on Repl.it](https://repl.it/badge/github/freeCodeCamp/boilerplate-project-urlshortener)](https://repl.it/github/freeCodeCamp/boilerplate-project-urlshortener) [![Run on Repl.it](https://repl.it/badge/github/freeCodeCamp/boilerplate-project-urlshortener)](https://repl.it/github/freeCodeCamp/boilerplate-project-urlshortener)
### User Stories
1. You should provide your own project, not the example URL.
2. You can POST a URL to `/api/shorturl/new` and get a JSON response with the property names `original_url` and `short_url` and the expected values for each.
3. When you visit `/api/shorturl/<short_url>`, you will be redirected to the original URL.
4. If you pass an invalid URL that doesn't follow the valid `http://www.example.com` format, the JSON response will contain `{ 'error': 'invalid url' }`.

View File

@ -25,14 +25,6 @@
</fieldset> </fieldset>
</form> </form>
</section> </section>
<section>
<h3>Example Creation:</h3>
<p><code>POST [project_url]/api/shorturl/new</code> - Body (URL encoded): <code>url=https://www.google.com</code></p>
<h3>Example Usage:</h3>
<a href="https://url-shortener.freecodecamp.repl.co/api/shorturl/3">[project_url]/api/shorturl/3</a>
<h3>Will Redirect to:</h3>
<p>https://forum.freecodecamp.org/</p>
</section>
</main> </main>
<footer> <footer>
<p>By <a href="https://www.freecodecamp.org">freeCodeCamp</a></p> <p>By <a href="https://www.freecodecamp.org">freeCodeCamp</a></p>