fix: fix quota not consuming

This commit is contained in:
JustSong
2023-05-16 13:29:22 +08:00
parent 4a2a0fe818
commit afbf20b5ba
3 changed files with 57 additions and 8 deletions
+1 -1
View File
@@ -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
}