Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,9 +8,9 @@ app = FastAPI(title="GoFile Downloader API")
|
|
| 8 |
|
| 9 |
@app.get("/download")
|
| 10 |
def download_endpoint(
|
|
|
|
| 11 |
url: str = Query(..., description="Link GoFile: https://gofile.io/d/xxxx"),
|
| 12 |
password: str | None = Query(None, description="Password nếu có"),
|
| 13 |
-
background_tasks: BackgroundTasks,
|
| 14 |
):
|
| 15 |
if not url.startswith("https://gofile.io/d/"):
|
| 16 |
raise HTTPException(400, "URL phải là link GoFile hợp lệ")
|
|
|
|
| 8 |
|
| 9 |
@app.get("/download")
|
| 10 |
def download_endpoint(
|
| 11 |
+
background_tasks: BackgroundTasks, # ← di chuyển lên đầu
|
| 12 |
url: str = Query(..., description="Link GoFile: https://gofile.io/d/xxxx"),
|
| 13 |
password: str | None = Query(None, description="Password nếu có"),
|
|
|
|
| 14 |
):
|
| 15 |
if not url.startswith("https://gofile.io/d/"):
|
| 16 |
raise HTTPException(400, "URL phải là link GoFile hợp lệ")
|