from fastapi import APIRouter, Depends
from app.auth import get_current_user
from app.models import User

router = APIRouter()


@router.get("/")
async def read_root(user: User = Depends(get_current_user)):
    return {"message": "Hello World", "user": user.email}


@router.get("/health")
async def health_check():
    # Health check remains public (no auth required)
    return {"status": "healthy", "message": "Backend is running"}
