fix: the initial quota for new token now calculated correctly (#51)
Some checks failed
Publish Docker image (amd64) / Push Docker image to multiple registries (push) Has been cancelled
Publish Docker image (arm64) / Push Docker image to multiple registries (push) Has been cancelled
Linux Release / release (push) Has been cancelled
macOS Release / release (push) Has been cancelled
Windows Release / release (push) Has been cancelled

This commit is contained in:
JustSong 2023-05-11 21:29:05 +08:00
parent 6e1ef75009
commit e6af636fa0

View File

@ -138,9 +138,7 @@ 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 {