mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-06-10 02:00:32 +08:00
fix(http): use explicit success checks in async callers
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user