Commit 27177ee1 by JustSong

fix: check if token is nil before using it

parent 6b2b6564
......@@ -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{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment