mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-16 13:13:41 +08:00
✨ feat: add chat cache (#152)
This commit is contained in:
@@ -105,6 +105,7 @@ func tokenAuth(c *gin.Context, key string) {
|
||||
c.Set("id", token.UserId)
|
||||
c.Set("token_id", token.Id)
|
||||
c.Set("token_name", token.Name)
|
||||
c.Set("chat_cache", token.ChatCache)
|
||||
if len(parts) > 1 {
|
||||
if model.IsAdmin(token.UserId) {
|
||||
channelId := common.String2Int(parts[1])
|
||||
|
||||
Reference in New Issue
Block a user