fix: check if token is nil before using it
This commit is contained in:
parent
6b2b656468
commit
27177ee1f4
@ -32,7 +32,7 @@ func GetSubscription(c *gin.Context) {
|
||||
if common.DisplayInCurrencyEnabled {
|
||||
amount /= common.QuotaPerUnit
|
||||
}
|
||||
if token.UnlimitedQuota {
|
||||
if token != nil && token.UnlimitedQuota {
|
||||
amount = 99999999.9999
|
||||
}
|
||||
subscription := OpenAISubscriptionResponse{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user