fix(http): use explicit success checks in async callers

This commit is contained in:
InfinityPacer
2026-04-10 17:40:55 +08:00
committed by jxxghp
parent 217fcfd1b2
commit 1af5f02832
3 changed files with 5 additions and 5 deletions

View File

@@ -493,7 +493,7 @@ async def latest_version(_: schemas.TokenPayload = Depends(verify_token)):
version_res = await AsyncRequestUtils(
proxies=settings.PROXY, headers=settings.GITHUB_HEADERS
).get_res(f"https://api.github.com/repos/jxxghp/MoviePilot/releases")
if version_res:
if version_res is not None and version_res.status_code == 200:
ver_json = version_res.json()
if ver_json:
return schemas.Response(success=True, data=ver_json)