feat: check for updates

This commit is contained in:
Timothy J. Baek
2024-02-25 11:55:15 -08:00
parent 6bfe2a6306
commit 759883a4c8
8 changed files with 91 additions and 14 deletions

View File

@@ -139,15 +139,11 @@ async def get_app_latest_release_version():
response.raise_for_status()
latest_version = response.json()["tag_name"]
# Compare versions
return {
"current": VERSION,
"latest": latest_version[1:],
}
return {"current": VERSION, "latest": latest_version[1:]}
except Exception as e:
raise HTTPException(
status_code=status.HTTP_503_SERVICE_UNAVAILABLE,
detail=ERROR_MESSAGES.NOT_FOUND,
detail=ERROR_MESSAGES.RATE_LIMIT_EXCEEDED,
)