Skip to content

Commit

Permalink
fix: check if token is nil before using it
Browse files Browse the repository at this point in the history
  • Loading branch information
songquanpeng committed Jun 25, 2023
1 parent 94ba3dd commit 6b1a24d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controller/billing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 6b1a24d

Please sign in to comment.