Skip to content

Commit

Permalink
Fixed main.py - Removed reptition
Browse files Browse the repository at this point in the history
  • Loading branch information
jr-do committed Jan 2, 2024
1 parent d7d9661 commit 1117234
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
from mylib.logic import wiki as wikilogic
from mylib.logic import phrase as wikiphrases



app = FastAPI()

@app.get("/")
Expand All @@ -26,15 +24,8 @@ async def wiki(name: str):
result = wikilogic(name)
return {"result": result}

@app.get("/wiki/{name}")
async def wiki(name: str):
"""Retrieve a Wikipedia page"""

result = wikilogic(name)
return {"result": result}

@app.get("/phrase/{name}")
async def wiki(name: str):
async def phrase(name: str):
"""Retrieve a Wikipedia page and return phrases"""

result = wikiphrases(name)
Expand Down

0 comments on commit 1117234

Please sign in to comment.