fix: fix quota not consuming
This commit is contained in:
1 parent
4a2a0fe818
commit
afbf20b5ba
3 files changed
+57
-8
No files matched your search
+1
-1
@@ -111,7 +111,7 @@ func TokenAuth() func(c *gin.Context) {
|
||||
c.Set("id", token.UserId)
|
||||
c.Set("token_id", token.Id)
|
||||
requestURL := c.Request.URL.String()
|
||||
consumeQuota := !token.UnlimitedQuota
|
||||
consumeQuota := true
|
||||
if strings.HasPrefix(requestURL, "/v1/models") {
|
||||
consumeQuota = false
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user