diff --git a/main.py b/main.py index cc4092d..eb66394 100644 --- a/main.py +++ b/main.py @@ -44,7 +44,11 @@ async def list_items(db: Session = Depends(get_db)): return {i.id: i for i in items} -@app.put("/api/items/{id}") +@app.put( + "/api/items/{id}", + status_code=201, + responses={201: {"description": "created"}, 204: {"description": "updated"}}, +) async def put_item(id: str, item: Item, db: Session = Depends(get_db)): if item.last_updated is None: item.last_updated = month_timestamp()