From f9e0e015658fa2271809171b6d041e75bd99fbc4 Mon Sep 17 00:00:00 2001 From: CorrectRoadH Date: Mon, 11 Mar 2024 17:28:47 +0800 Subject: [PATCH] feat:clean login limit after login successful --- route/v1/user.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/route/v1/user.go b/route/v1/user.go index b030289..c19d833 100644 --- a/route/v1/user.go +++ b/route/v1/user.go @@ -134,6 +134,9 @@ func PostUserLogin(c *gin.Context) { return } + // clean limit + limiter = rate.NewLimiter(rate.Every(time.Minute), 5) + privateKey, _ := service.MyService.User().GetKeyPair() token := system_model.VerifyInformation{}