Spaces:
Running
Running
feat: add detail to update ticket API
Browse files- backend/main.py +2 -0
backend/main.py
CHANGED
|
@@ -116,10 +116,12 @@ async def update_flow_ticket(body: dict = Body(...)):
|
|
| 116 |
ticket_id = body.get("id")
|
| 117 |
status = body.get("status")
|
| 118 |
message = body.get("message")
|
|
|
|
| 119 |
for t in FAKE_TICKETS:
|
| 120 |
if t["id"] == ticket_id:
|
| 121 |
t["status"] = status
|
| 122 |
t["message"] = message
|
|
|
|
| 123 |
return t
|
| 124 |
raise HTTPException(status_code=404, detail="Ticket not found")
|
| 125 |
|
|
|
|
| 116 |
ticket_id = body.get("id")
|
| 117 |
status = body.get("status")
|
| 118 |
message = body.get("message")
|
| 119 |
+
detail = body.get("detail")
|
| 120 |
for t in FAKE_TICKETS:
|
| 121 |
if t["id"] == ticket_id:
|
| 122 |
t["status"] = status
|
| 123 |
t["message"] = message
|
| 124 |
+
t["detail"] = detail
|
| 125 |
return t
|
| 126 |
raise HTTPException(status_code=404, detail="Ticket not found")
|
| 127 |
|