Commit 8f64927a by JustSong

fix: the initial quota for new token now calculated correctly (#51)

parent b3582485
...@@ -138,10 +138,8 @@ func AddToken(c *gin.Context) { ...@@ -138,10 +138,8 @@ func AddToken(c *gin.Context) {
}) })
return return
} }
if quota > 0 {
cleanToken.RemainQuota = quota cleanToken.RemainQuota = quota
} }
}
err = cleanToken.Insert() err = cleanToken.Insert()
if err != nil { if err != nil {
c.JSON(http.StatusOK, gin.H{ c.JSON(http.StatusOK, gin.H{
......
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