Spaces:
Sleeping
Sleeping
from fastapi import APIRouter, Depends | |
from custom_auth import get_current_user_from_token | |
router = APIRouter() | |
async def health_check(): | |
""" | |
Check if the API is running | |
""" | |
return {"status": "healthy"} | |
async def auth_check(current_user=Depends(get_current_user_from_token)): | |
""" | |
Debug endpoint to verify authentication is working | |
""" | |
return { | |
"authenticated": True, | |
"username": current_user.username, | |
"message": "Authentication successful", | |
} | |