fix parse to int

This commit is contained in:
2023-07-07 23:40:57 +02:00
parent 0d4f34f6d5
commit 44c8c96fbd
3 changed files with 10 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ package handler
import (
"fmt"
"log"
"gitea.urkob.com/urko/prosody-password/internal/services/fail2ban"
"gitea.urkob.com/urko/prosody-password/internal/services/prosody"
@@ -33,6 +34,7 @@ func (handler ProsodyHandler) Post(c *fiber.Ctx) error {
}
if err := handler.prosodyService.ChangePassword(req.User, req.CurrentPassword, req.NewPassword); err != nil {
log.Println("c.IPs()", c.IPs())
for _, ip := range c.IPs() {
handler.fail2banSrv.FailedAttempt(ip)
}