app/routes.py aktualisiert
docker-build-and-push / build (push) Successful in 18s

This commit is contained in:
2026-08-03 15:10:49 +02:00
parent 73ac218b7b
commit 806b912403
+12 -1
View File
@@ -40,4 +40,15 @@ async def subscribe_repo(req: SubscribeRequest):
"path": str(target_dir),
"success": True,
"token_used": bool(effective_token and not req.token_provided) # Zeigt ob Token vom System oder User kommt
}
}
@router.get("/repos") #✅ Diese muss existieren für /api/repos!
async def list_repos():
from .main import GITEE_URL, get_token
token = get_token()
headers = {"Authorization": f"token {token}"} if token else {}
async with httpx.AsyncClient() as client:
resp = await client.get(f"{GITEE_URL}/api/v1/user/repos", headers=headers)
return resp.json()