first usable curator UI

This commit is contained in:
2026-04-25 23:04:15 +02:00
parent 8f94c38309
commit aa18dfc8f2
10 changed files with 677 additions and 10 deletions

View File

@@ -29,8 +29,8 @@ def get_service(settings: Settings = Depends(get_settings)) -> RegistryService:
class RepositoryCreate(BaseModel):
name: str
url: str
name: str | None = None
description: str | None = None
branch: str = "main"
@@ -76,6 +76,11 @@ class CandidateGraphApproval(BaseModel):
app = FastAPI(title="Repository Ability Registry", version="0.1.0")
from repo_registry.web_ui.views import router as ui_router
app.include_router(ui_router)
@app.get("/health")
def health() -> dict[str, str]:
return {"status": "ok"}
@@ -88,7 +93,7 @@ def create_repository(
) -> dict[str, object]:
try:
repository = service.register_repository(**payload.model_dump())
except ValueError as exc:
except (RuntimeError, ValueError) as exc:
raise HTTPException(status_code=400, detail=str(exc)) from exc
return asdict(repository)