mirror of
				https://github.com/songquanpeng/one-api.git
				synced 2025-11-04 15:53:42 +08:00 
			
		
		
		
	fix: fix /v1/models not working (close #66)
This commit is contained in:
		@@ -112,7 +112,7 @@ func TokenAuth() func(c *gin.Context) {
 | 
			
		||||
		c.Set("token_id", token.Id)
 | 
			
		||||
		requestURL := c.Request.URL.String()
 | 
			
		||||
		consumeQuota := !token.UnlimitedQuota
 | 
			
		||||
		if strings.HasPrefix(requestURL, "/models") {
 | 
			
		||||
		if strings.HasPrefix(requestURL, "/v1/models") {
 | 
			
		||||
			consumeQuota = false
 | 
			
		||||
		}
 | 
			
		||||
		c.Set("consume_quota", consumeQuota)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user