# NIKAME GENERATED — DO NOT EDIT DIRECTLY
from fastapi import APIRouter, Depends
from app.auth.api_keys import generate_key, get_api_key

router = APIRouter(prefix="/keys", tags=["API Keys"])

@router.post("/generate")
async def create_key():
    key = generate_key()
    # Save to DB here
    return {"api_key": key}

@router.get("/protected")
async def protected_route(key: str = Depends(get_api_key)):
    return {"message": "Success", "key_used": key[:10] + "..."}
