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

This commit is contained in:
caisi35 2025-01-24 17:30:27 +08:00
parent e04773a409
commit 8ffe29de78

View file

@ -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))
}