Update app.py
Browse files
app.py
CHANGED
|
@@ -610,15 +610,14 @@ async def list_workers():
|
|
| 610 |
"workers": workers_info
|
| 611 |
}
|
| 612 |
|
| 613 |
-
from pydantic import BaseModel
|
| 614 |
-
|
| 615 |
class StatusRequest(BaseModel):
|
| 616 |
request_id: str
|
| 617 |
|
| 618 |
@app.post("/api/check-translation-status")
|
| 619 |
-
async def check_translation_status(
|
| 620 |
-
|
| 621 |
-
return await check_status(request_id)
|
|
|
|
| 622 |
|
| 623 |
|
| 624 |
if __name__ == "__main__":
|
|
|
|
| 610 |
"workers": workers_info
|
| 611 |
}
|
| 612 |
|
|
|
|
|
|
|
| 613 |
class StatusRequest(BaseModel):
|
| 614 |
request_id: str
|
| 615 |
|
| 616 |
@app.post("/api/check-translation-status")
|
| 617 |
+
async def check_translation_status(req: StatusRequest):
|
| 618 |
+
# بازگشت همان ساختاری که GET /api/status/{request_id} میدهد
|
| 619 |
+
return await check_status(req.request_id)
|
| 620 |
+
|
| 621 |
|
| 622 |
|
| 623 |
if __name__ == "__main__":
|