Browse Source

Add /items endpoint to return a list of items

jezvgg 2 months ago
parent
commit
1ca8a7598e
1 changed files with 4 additions and 0 deletions
  1. 4 0
      main.py

+ 4 - 0
main.py

@@ -5,3 +5,7 @@ app = FastAPI()
 @app.get("/")
 def read_root():
     return {"message": "Hello, World!"}
+
+@app.get("/items")
+def get_items():
+    return {"items": ["item1", "item2", "item3"]}