23 lines
572 B
Python
23 lines
572 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.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"}
|
|
|
|
# Initialize and include test routes
|
|
def init_test_routes():
|
|
return test_route
|