refactor: Improve code readability and structure across TTS modules
Some checks failed
Backend CI / lint (push) Failing after 10s
Backend CI / test (push) Failing after 1m36s

This commit is contained in:
JSC
2025-09-21 19:07:32 +02:00
parent 35b857fd0d
commit acdf191a5a
8 changed files with 106 additions and 56 deletions

View File

@@ -206,8 +206,6 @@ async def delete_tts(
await tts_service.delete_tts(tts_id=tts_id, user_id=current_user.id)
return {"message": "TTS generation deleted successfully"}
except ValueError as e:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
@@ -223,3 +221,5 @@ async def delete_tts(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
detail=f"Failed to delete TTS: {e!s}",
) from e
else:
return {"message": "TTS generation deleted successfully"}