Skip to content

Commit

Permalink
update (fastapi): double method
Browse files Browse the repository at this point in the history
  • Loading branch information
santanche committed Oct 5, 2024
1 parent adb5270 commit b1bbf04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions service/basic/fastapi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
def read_root():
return {"Hello": "World"}

@app.get("/items/{item_id}")
def read_item(item_id: int, q: str | None = None):
return {"item_id": item_id, "q": q}
@app.get("/double/{number}")
def read_item(number: int | None = None):
return {"double": (number * 2)}

0 comments on commit b1bbf04

Please sign in to comment.