Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -30,4 +30,8 @@ def update_customer(customer_id: int, customer: Customer):
|
|
30 |
@app.delete("/customers/{customer_id}", response_model=Customer)
|
31 |
def delete_customer(customer_id: int):
|
32 |
customers_list.pop(customer_id)
|
33 |
-
return {"message": "Customer deleted successfully"}
|
|
|
|
|
|
|
|
|
|
30 |
@app.delete("/customers/{customer_id}", response_model=Customer)
|
31 |
def delete_customer(customer_id: int):
|
32 |
customers_list.pop(customer_id)
|
33 |
+
return {"message": "Customer deleted successfully"}
|
34 |
+
|
35 |
+
if __name__ == "__main__":
|
36 |
+
import uvicorn
|
37 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|