23 lines
553 B
Python
23 lines
553 B
Python
"""
|
|
Base router configuration and setup.
|
|
"""
|
|
|
|
from fastapi import APIRouter, Request
|
|
from middleware.auth_middleware import MiddlewareModule
|
|
|
|
# Create test router
|
|
test_route = APIRouter(prefix="/test", tags=["Test"])
|
|
test_route.include_router(test_route, include_in_schema=True)
|
|
|
|
|
|
@test_route.get("/health")
|
|
@MiddlewareModule.auth_required
|
|
async def health_check(request: Request):
|
|
return {"status": "healthy", "message": "Service is running"}
|
|
|
|
|
|
@test_route.get("/ping")
|
|
async def ping_test():
|
|
return {"ping": "pong", "service": "base-router"}
|
|
|