mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-14 23:00:27 +00:00
refactor: use quota instead of times
This commit is contained in:
@@ -110,7 +110,7 @@ func TokenAuth() func(c *gin.Context) {
|
||||
}
|
||||
c.Set("id", token.UserId)
|
||||
c.Set("token_id", token.Id)
|
||||
c.Set("unlimited_times", token.UnlimitedTimes)
|
||||
c.Set("unlimited_quota", token.UnlimitedQuota)
|
||||
if len(parts) > 1 {
|
||||
if model.IsAdmin(token.UserId) {
|
||||
c.Set("channelId", parts[1])
|
||||
|
Reference in New Issue
Block a user