瀏覽代碼

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

JustSong 2 年之前
父節點
當前提交
e6af636fa0
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      controller/token.go

+ 1 - 3
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 {