26 lines
642 B
Python
26 lines
642 B
Python
from fastapi import Depends, FastAPI
|
|
|
|
from core.domains import Domain
|
|
from webapi import ingest, review, runs
|
|
from webapi.auth import caller
|
|
|
|
app = FastAPI(
|
|
title="ISSSTELEON",
|
|
version="0.0.0",
|
|
dependencies=[Depends(caller)], # every route; where authentication will go
|
|
generate_unique_id_function=lambda route: route.name, # clean names in the generated client
|
|
)
|
|
app.include_router(ingest.router)
|
|
app.include_router(review.router)
|
|
app.include_router(runs.router)
|
|
|
|
|
|
@app.get("/health")
|
|
def health() -> dict[str, str]:
|
|
return {"status": "ok"}
|
|
|
|
|
|
@app.get("/domains")
|
|
def domains() -> list[Domain]:
|
|
return list(Domain)
|