Spaces:
Sleeping
Sleeping
update main.py
Browse files
main.py
CHANGED
|
@@ -10,7 +10,6 @@ app = FastAPI(
|
|
| 10 |
redoc_url="/redoc"
|
| 11 |
)
|
| 12 |
|
| 13 |
-
# In-memory storage
|
| 14 |
items = []
|
| 15 |
|
| 16 |
class Item(BaseModel):
|
|
@@ -20,7 +19,7 @@ class Item(BaseModel):
|
|
| 20 |
|
| 21 |
@app.get("/")
|
| 22 |
async def root():
|
| 23 |
-
return {"message": "Welcome to FastAPI CRUD API!
|
| 24 |
|
| 25 |
@app.get("/items", response_model=List[Item])
|
| 26 |
async def get_items():
|
|
|
|
| 10 |
redoc_url="/redoc"
|
| 11 |
)
|
| 12 |
|
|
|
|
| 13 |
items = []
|
| 14 |
|
| 15 |
class Item(BaseModel):
|
|
|
|
| 19 |
|
| 20 |
@app.get("/")
|
| 21 |
async def root():
|
| 22 |
+
return {"message": "Welcome to FastAPI CRUD API! Visit /docs for Swagger UI."}
|
| 23 |
|
| 24 |
@app.get("/items", response_model=List[Item])
|
| 25 |
async def get_items():
|