From e6af636fa08b6665492b04f2adbc232b830f6b0d Mon Sep 17 00:00:00 2001 From: JustSong Date: Thu, 11 May 2023 21:29:05 +0800 Subject: [PATCH] fix: the initial quota for new token now calculated correctly (#51) --- controller/token.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/controller/token.go b/controller/token.go index cff2e6a631..b8b26d4b81 100644 --- a/controller/token.go +++ b/controller/token.go @@ -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 {