Explorar o código

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

JustSong %!s(int64=2) %!d(string=hai) anos
pai
achega
94ba3dd024
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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,