From f6c2ce45c1ef0c45a421740c7d5d5bf406b07567 Mon Sep 17 00:00:00 2001 From: Brandon-lz <48017177+Brandon-lz@users.noreply.github.com> Date: Tue, 17 Dec 2024 16:57:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=99=90=E6=B5=81=E4=B8=8D?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=8A=A5=E9=94=99=E4=BF=A1=E6=81=AF=E7=9A=84?= =?UTF-8?q?bug=20(#1966)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/middleware/limit_ip.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/middleware/limit_ip.go b/server/middleware/limit_ip.go index 315010b22..acc6e98b6 100644 --- a/server/middleware/limit_ip.go +++ b/server/middleware/limit_ip.go @@ -27,7 +27,7 @@ type LimitConfig struct { func (l LimitConfig) LimitWithTime() gin.HandlerFunc { return func(c *gin.Context) { if err := l.CheckOrMark(l.GenerationKey(c), l.Expire, l.Limit); err != nil { - c.JSON(http.StatusOK, gin.H{"code": response.ERROR, "msg": err}) + c.JSON(http.StatusOK, gin.H{"code": response.ERROR, "msg": err.Error()}) c.Abort() return } else {