feat: 渠道类型接口

This commit is contained in:
tbphp
2025-07-05 10:58:54 +08:00
parent 85452b64a7
commit 17f1f06070
3 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package handler
import (
"gpt-load/internal/channel"
"gpt-load/internal/response"
"github.com/gin-gonic/gin"
)
// CommonHandler handles common, non-grouped requests.
type CommonHandler struct{}
// NewCommonHandler creates a new CommonHandler.
func NewCommonHandler() *CommonHandler {
return &CommonHandler{}
}
// GetChannelTypes returns a list of available channel types.
func (h *CommonHandler) GetChannelTypes(c *gin.Context) {
channelTypes := channel.GetChannels()
response.Success(c, channelTypes)
}