refactor: Simplify TTS API endpoints by removing specific paths for generate and history

This commit is contained in:
JSC
2025-09-21 13:38:12 +02:00
parent d5f9a3c736
commit c8b796aa94

View File

@@ -51,7 +51,7 @@ async def get_tts_service(
return TTSService(session) return TTSService(session)
@router.post("/generate") @router.post("")
async def generate_tts( async def generate_tts(
request: TTSGenerateRequest, request: TTSGenerateRequest,
current_user: Annotated[User, Depends(get_current_active_user_flexible)], current_user: Annotated[User, Depends(get_current_active_user_flexible)],
@@ -140,8 +140,8 @@ async def get_provider(
) )
@router.get("/history") @router.get("")
async def get_tts_history( async def get_tts_list(
current_user: Annotated[User, Depends(get_current_active_user_flexible)], current_user: Annotated[User, Depends(get_current_active_user_flexible)],
tts_service: Annotated[TTSService, Depends(get_tts_service)], tts_service: Annotated[TTSService, Depends(get_tts_service)],
limit: int = 50, limit: int = 50,