소스 검색

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 {