mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
fix(user):"Attempts" create and update to 2
This commit is contained in:
parent
e04773a409
commit
8ffe29de78
1 changed files with 1 additions and 0 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue