feat: add chat cache (#152)

This commit is contained in:
Buer
2024-04-16 10:36:18 +08:00
committed by GitHub
parent bbaa4eec4b
commit 3c7c13758b
23 changed files with 557 additions and 49 deletions

View File

@@ -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])