feat(subscribe): update subscribe path

This commit is contained in:
Chang lue Tsen 2025-09-16 10:39:19 -04:00
parent 621eda41c2
commit b5c756af35
2 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ type Verify struct {
type SubscribeConfig struct { type SubscribeConfig struct {
SingleModel bool `yaml:"SingleModel" default:"false"` SingleModel bool `yaml:"SingleModel" default:"false"`
SubscribePath string `yaml:"SubscribePath" default:"/api/subscribe"` SubscribePath string `yaml:"SubscribePath" default:"/v1/subscribe/config"`
SubscribeDomain string `yaml:"SubscribeDomain" default:""` SubscribeDomain string `yaml:"SubscribeDomain" default:""`
PanDomain bool `yaml:"PanDomain" default:"false"` PanDomain bool `yaml:"PanDomain" default:"false"`
UserAgentLimit bool `yaml:"UserAgentLimit" default:"false"` UserAgentLimit bool `yaml:"UserAgentLimit" default:"false"`

View File

@ -74,7 +74,7 @@ func SubscribeHandler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
func RegisterSubscribeHandlers(router *gin.Engine, serverCtx *svc.ServiceContext) { func RegisterSubscribeHandlers(router *gin.Engine, serverCtx *svc.ServiceContext) {
path := serverCtx.Config.Subscribe.SubscribePath path := serverCtx.Config.Subscribe.SubscribePath
if path == "" { if path == "" {
path = "/api/subscribe" path = "/v1/subscribe/config"
} }
router.GET(path, SubscribeHandler(serverCtx)) router.GET(path, SubscribeHandler(serverCtx))
} }