Browse Source

Added /items endpoint that returns a list of items

Vsevolod Levitan 2 months ago
parent
commit
f2fb414152
1 changed files with 5 additions and 0 deletions
  1. 5 0
      main.py

+ 5 - 0
main.py

@@ -5,3 +5,8 @@ app = FastAPI()
 @app.get("/")
 def read_root():
     return {"message": "Hello, Pivozavrы!"}
+
+
+@app.get("/items")
+def get_items():
+    return {"items": ["pivo", "riba", "holodec"]}