fix: fix quota not consuming

This commit is contained in:
JustSong committed 2023-05-16 13:29:22 +08:00
1 parent 4a2a0fe818
commit afbf20b5ba
3 files changed
+57 -8

No files matched your search

+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
}