feat: now use token as the unit of quota (close #33)

This commit is contained in:
JustSong committed 2023-04-28 16:58:55 +08:00
1 parent aa18ac4864
commit bcdfb7d0d9
5 files changed
+185 -22

No files matched your search

+1 -1
View File
@@ -55,7 +55,7 @@ func Redeem(key string, tokenId int) (quota int, err error) {
if redemption.Status != common.RedemptionCodeStatusEnabled {
return 0, errors.New("该兑换码已被使用")
}
err = TopUpToken(tokenId, redemption.Quota)
err = TopUpTokenQuota(tokenId, redemption.Quota)
if err != nil {
return 0, err
}