소스 검색

chore: billing api now will return a large number if unlimited quota is set

JustSong 2 년 전
부모
커밋
94ba3dd024
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      controller/billing.go

+ 3 - 0
controller/billing.go

@@ -32,6 +32,9 @@ func GetSubscription(c *gin.Context) {
 	if common.DisplayInCurrencyEnabled {
 		amount /= common.QuotaPerUnit
 	}
+	if token.UnlimitedQuota {
+		amount = 99999999.9999
+	}
 	subscription := OpenAISubscriptionResponse{
 		Object:             "billing_subscription",
 		HasPaymentMethod:   true,