Skip to content

Commit

Permalink
fix: the initial quota for new token now calculated correctly (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
songquanpeng committed May 11, 2023
1 parent 6e1ef75 commit e6af636
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions controller/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,7 @@ func AddToken(c *gin.Context) {
})
return
}
if quota > 0 {
cleanToken.RemainQuota = quota
}
cleanToken.RemainQuota = quota
}
err = cleanToken.Insert()
if err != nil {
Expand Down

0 comments on commit e6af636

Please sign in to comment.