fastapi-template/src/api.py

22 lines
524 B
Python
Raw Normal View History

2026-05-13 15:09:59 +01:00
"""
This module hooks the routers for the main endpoints into a single router for importing to the app.
"""
from fastapi import APIRouter
from src.auth.router import router as auth_router
2026-05-13 16:13:56 +01:00
from src._module_template.router import router as template_router
2026-05-13 15:09:59 +01:00
api_router = APIRouter(
prefix="/api/v1"
)
2026-05-13 15:09:59 +01:00
api_router.include_router(auth_router)
2026-05-13 16:13:56 +01:00
api_router.include_router(template_router)
2026-05-13 15:09:59 +01:00
2026-05-13 15:09:59 +01:00
@api_router.get("/healthcheck", include_in_schema=False)
def healthcheck():
"""Simple health check endpoint."""
return {"status": "ok"}