generated from coulomb/repo-seed
first usable curator UI
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user