Commit e78289d1 by CalciumIon

feat: 统计无限令牌的已用额度 (close #308)

parent ab5f17d0
...@@ -272,7 +272,6 @@ func PostConsumeTokenQuota(tokenId int, userQuota int, quota int, preConsumedQuo ...@@ -272,7 +272,6 @@ func PostConsumeTokenQuota(tokenId int, userQuota int, quota int, preConsumedQuo
return err return err
} }
if !token.UnlimitedQuota {
if quota > 0 { if quota > 0 {
err = DecreaseTokenQuota(tokenId, quota) err = DecreaseTokenQuota(tokenId, quota)
} else { } else {
...@@ -281,7 +280,6 @@ func PostConsumeTokenQuota(tokenId int, userQuota int, quota int, preConsumedQuo ...@@ -281,7 +280,6 @@ func PostConsumeTokenQuota(tokenId int, userQuota int, quota int, preConsumedQuo
if err != nil { if err != nil {
return err return err
} }
}
if sendEmail { if sendEmail {
if (quota + preConsumedQuota) != 0 { if (quota + preConsumedQuota) != 0 {
......
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