This commit is contained in:
@@ -52,3 +52,14 @@ async def list_repos():
|
|||||||
async with httpx.AsyncClient() as client:
|
async with httpx.AsyncClient() as client:
|
||||||
resp = await client.get(f"{GITEE_URL}/api/v1/user/repos", headers=headers)
|
resp = await client.get(f"{GITEE_URL}/api/v1/user/repos", headers=headers)
|
||||||
return resp.json()
|
return resp.json()
|
||||||
|
|
||||||
|
@router.get("/repos/{repo_id}/status")
|
||||||
|
async def get_repo_status(repo_id: int):
|
||||||
|
import os
|
||||||
|
# Prüfe ob Ordner existiert
|
||||||
|
return {"subscribed": os.path.exists(f"/projects/repo-{repo_id}")}
|
||||||
|
```[1]
|
||||||
|
|
||||||
|
Für Datei-Änderungen brauchst du a `watchdog` Observer, der Änderungs-Hashes speichert [1].
|
||||||
|
|
||||||
|
Möchtest du die Implementierung direkt erledigen lassen?
|
||||||
Reference in New Issue
Block a user