refactor(relay): rename RelayTask to RelayTaskFetch and update routing

- Renamed RelayTask function to RelayTaskFetch for clarity.
- Updated routing in relay-router.go and video-router.go to use RelayTaskFetch for fetch operations.
- Enhanced error handling in RelayTaskFetch function.
- Adjusted task data conversion in TaskAdaptor to include task ID.
This commit is contained in:
CaIon
2026-02-21 23:05:58 +08:00
parent 64d18a5fdf
commit 7d5fc3ff51
4 changed files with 28 additions and 18 deletions
+2 -2
View File
@@ -174,8 +174,8 @@ func SetRelayRouter(router *gin.Engine) {
relaySunoRouter.Use(middleware.TokenAuth(), middleware.Distribute())
{
relaySunoRouter.POST("/submit/:action", controller.RelayTask)
relaySunoRouter.POST("/fetch", controller.RelayTask)
relaySunoRouter.GET("/fetch/:id", controller.RelayTask)
relaySunoRouter.POST("/fetch", controller.RelayTaskFetch)
relaySunoRouter.GET("/fetch/:id", controller.RelayTaskFetch)
}
relayGeminiRouter := router.Group("/v1beta")