from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware

from app.api import documents, threads, exports

app = FastAPI(
    title="DirektVermittlungDe API",
    version="0.1.0",
    root_path="/v1",
)

app.add_middleware(
    CORSMiddleware,
    allow_origins=["*"],
    allow_methods=["*"],
    allow_headers=["*"],
)

app.include_router(documents.router)
app.include_router(threads.router)
app.include_router(exports.router)
