tbphp 7 месяцев назад
Родитель
Сommit
7192437863
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      controller/channel-billing.go

+ 2 - 2
controller/channel-billing.go

@@ -108,7 +108,7 @@ type DeepSeekUsageResponse struct {
 	} `json:"balance_infos"`
 	} `json:"balance_infos"`
 }
 }
 
 
-type OpenRouterResponse struct {
+type OpenRouterCreditResponse struct {
 	Data struct {
 	Data struct {
 		TotalCredits float64 `json:"total_credits"`
 		TotalCredits float64 `json:"total_credits"`
 		TotalUsage   float64 `json:"total_usage"`
 		TotalUsage   float64 `json:"total_usage"`
@@ -294,7 +294,7 @@ func updateChannelOpenRouterBalance(channel *model.Channel) (float64, error) {
 	if err != nil {
 	if err != nil {
 		return 0, err
 		return 0, err
 	}
 	}
-	response := OpenRouterResponse{}
+	response := OpenRouterCreditResponse{}
 	err = json.Unmarshal(body, &response)
 	err = json.Unmarshal(body, &response)
 	if err != nil {
 	if err != nil {
 		return 0, err
 		return 0, err