mirror of
				https://github.com/songquanpeng/one-api.git
				synced 2025-11-04 07:43:41 +08:00 
			
		
		
		
	fix: the initial quota for new token now calculated correctly (#51)
This commit is contained in:
		@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user