瀏覽代碼

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,