feat: add IFreeTime endpoint and response handling for TTS application

This commit is contained in:
王锦强
2025-04-02 21:51:50 +08:00
parent 857f9055c8
commit 5ec2b625e8
3 changed files with 125 additions and 0 deletions

View File

@@ -51,6 +51,7 @@ func SetupRoutes(cfg *config.Config, ttsService tts.Service) (*gin.Engine, error
baseRouter.POST("/tts", middleware.TTSAuth(cfg.TTS.ApiKey), ttsHandler.HandleTTS)
baseRouter.GET("/tts", middleware.TTSAuth(cfg.TTS.ApiKey), ttsHandler.HandleTTS)
baseRouter.GET("/reader.json", middleware.TTSAuth(cfg.TTS.ApiKey), ttsHandler.HandleReader)
baseRouter.GET("ifreetime.json", middleware.TTSAuth(cfg.TTS.ApiKey), ttsHandler.HandleIFreeTime)
// 设置语音列表API路由
baseRouter.GET("/voices", voicesHandler.HandleVoices)