style: 错误信息英文返回-framework模块
This commit is contained in:
1 parent
267a13d3d6
commit
81138b8c22
9 files changed
+28
-21
No files matched your search
@@ -90,7 +90,8 @@ func RateLimit(option LimitOption) gin.HandlerFunc {
|
||||
c.Header("X-RateLimit-Reset", fmt.Sprintf("%d", time.Now().Unix()+int64(rateTime))) // 重置时间戳
|
||||
|
||||
if rateCount >= option.Count {
|
||||
c.JSON(200, result.ErrMsg("访问过于频繁,请稍候再试"))
|
||||
// 访问过于频繁,请稍候再试
|
||||
c.JSON(200, result.ErrMsg("Visits are too frequent. Please try again later"))
|
||||
c.Abort() // 停止执行后续的处理函数
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user