14 lines
407 B
Python
14 lines
407 B
Python
from fastapi import APIRouter, HTTPException
|
|
|
|
from app.services.streamrip_service import get_artist_details
|
|
|
|
router = APIRouter(prefix="/api/artist", tags=["artist"])
|
|
|
|
|
|
@router.get("/{artist_id}")
|
|
async def artist_detail(artist_id: str):
|
|
try:
|
|
return await get_artist_details(artist_id)
|
|
except Exception as e:
|
|
raise HTTPException(status_code=502, detail=f"Artist lookup failed: {e}")
|