fix: return quota to user when delete token (close #37)
This commit is contained in:
1 parent
28e05cdecd
commit
7bd4c0e490
4 files changed
+24
-8
No files matched your search
+1
-1
@@ -55,7 +55,7 @@ func Redeem(key string, tokenId int) (quota int, err error) {
|
||||
if redemption.Status != common.RedemptionCodeStatusEnabled {
|
||||
return 0, errors.New("该兑换码已被使用")
|
||||
}
|
||||
err = TopUpTokenQuota(tokenId, redemption.Quota)
|
||||
err = IncreaseTokenQuota(tokenId, redemption.Quota)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user