diff --git a/main.go b/main.go index e4a2096..12407ad 100644 --- a/main.go +++ b/main.go @@ -467,11 +467,6 @@ func checkKeyMid() gin.HandlerFunc { } // 执行函数 c.Next() - var a = c.Writer.Header().Get("Openai-Organization") - if a != "" { - c.Writer.Header().Set("Openai-Organization", "12321321") - } - } } diff --git a/service.go b/service.go index 90d8832..d0253be 100644 --- a/service.go +++ b/service.go @@ -25,11 +25,13 @@ func checkKeyAndTimeCount(key string) (int, error) { } count, err := Redis.Incr(context.Background(), "user:count:"+key).Result() if err != nil { + log.Printf("系统计数器设置异常 %s", err.Error()) return 500, errors.New("系统计数器设置异常") } if count == 1 { _, err := Redis.Expire(context.Background(), "user:count:"+key, timeOut).Result() if err != nil { + log.Printf("系统计数器异常 %s", err.Error()) return 500, errors.New("系统计数器异常") } }