feat(security): restore token validation

This commit is contained in:
InfinityPacer
2024-10-08 17:28:30 +08:00
parent 4f01b82b81
commit 4af57d9857
2 changed files with 8 additions and 4 deletions
+4 -2
View File
@@ -102,7 +102,8 @@ def start(
@router.get("/stop/{hashString}", summary="暂停任务", response_model=schemas.Response)
def stop(hashString: str) -> Any:
def stop(hashString: str,
_: schemas.TokenPayload = Depends(verify_token)) -> Any:
"""
暂停下载任务
"""
@@ -111,7 +112,8 @@ def stop(hashString: str) -> Any:
@router.delete("/{hashString}", summary="删除下载任务", response_model=schemas.Response)
def delete(hashString: str) -> Any:
def delete(hashString: str,
_: schemas.TokenPayload = Depends(verify_token)) -> Any:
"""
删除下载任务
"""