瀏覽代碼

fix: prompt user the feat is not implemented (#125)

JustSong 2 年之前
父節點
當前提交
1e1c6a828f
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      controller/channel-billing.go

+ 4 - 0
controller/channel-billing.go

@@ -40,10 +40,14 @@ type OpenAIUsageResponse struct {
 func updateChannelBalance(channel *model.Channel) (float64, error) {
 	baseURL := common.ChannelBaseURLs[channel.Type]
 	switch channel.Type {
+	case common.ChannelTypeOpenAI:
+		// do nothing
 	case common.ChannelTypeAzure:
 		return 0, errors.New("尚未实现")
 	case common.ChannelTypeCustom:
 		baseURL = channel.BaseURL
+	default:
+		return 0, errors.New("尚未实现")
 	}
 	url := fmt.Sprintf("%s/v1/dashboard/billing/subscription", baseURL)