Explorar o código

fix: fix unable to update custom channel's balance

JustSong %!s(int64=2) %!d(string=hai) anos
pai
achega
17b7646c12
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      controller/channel-billing.go

+ 2 - 0
controller/channel-billing.go

@@ -27,6 +27,8 @@ func updateChannelBalance(channel *model.Channel) (float64, error) {
 	switch channel.Type {
 	case common.ChannelTypeAzure:
 		return 0, errors.New("尚未实现")
+	case common.ChannelTypeCustom:
+		baseURL = channel.BaseURL
 	}
 	url := fmt.Sprintf("%s/v1/dashboard/billing/subscription", baseURL)