فهرست منبع

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 {