Explorar el Código

fix(user):"Attempts" create and update to 2

caisi35 hace 6 meses
padre
commit
8ffe29de78
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      internal/user/login.go

+ 1 - 0
internal/user/login.go

@@ -42,6 +42,7 @@ func BanIP(ip string) {
 			Attempts:  1,
 			ExpiredAt: time.Now().Unix() + int64(settings.AuthSettings.BanThresholdMinutes*60),
 		})
+		return
 	}
 	_, _ = b.Where(b.IP.Eq(ip)).UpdateSimple(b.Attempts.Add(1))
 }