danicor commited on
Commit
32fef81
·
verified ·
1 Parent(s): bfb3f26

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
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(request: StatusRequest):
620
- request_id = request.request_id
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__":