fix: correct repo URL fallback and HTTP error reporting in update service

- Replace hardcoded legacy Gitea URL in settings.py fallback
- Skip legacy Gitea URL even if saved in DB (treat as unset)
- Track last_response in branch loop so errors report the real HTTP
  status code instead of always showing "HTTP unknown"
- Unify 401/403/404 into one "private or not accessible" message

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
markmorado
2026-03-08 02:52:17 +01:00
parent 93d60b47e3
commit 3d9d1bb2e0
2 changed files with 23 additions and 14 deletions

View File

@@ -706,7 +706,7 @@ async def get_repository_url(
setting = db.query(PanelSettings).filter(PanelSettings.key == "git_repository_url").first()
if setting:
return {"repository_url": setting.value}
return {"repository_url": "https://git.tzim.uz/dilshod/pve_manager"}
return {"repository_url": "https://github.com/markmorado/pvemanager"}
@router.put("/api/updates/repository")