Browse Source

Add /item endpoint to return item

Danil138 2 tháng trước cách đây
mục cha
commit
51f04b921f
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      main.py

+ 4 - 0
main.py

@@ -9,3 +9,7 @@ def read_root():
 @app.get("/items")
 def get_items():
     return {"items": ["item1", "item2", "item3"]}
+
+@app.get("/item")
+def get_items():
+    return "item1"