Przeglądaj źródła

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

JustSong 2 lat temu
rodzic
commit
e6af636fa0
1 zmienionych plików z 1 dodań i 3 usunięć
  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 {