chore: fix bug
Backend - Build & Lint / build (push) Failing after 32m32s

This commit is contained in:
Xor290
2026-08-04 21:09:58 +02:00
parent e5a17443cf
commit 1623a9eafd
3 changed files with 177 additions and 1 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import (
"fmt"
"gestion/models"
"gestion/utils"
"strings"
)
func (d *Database) CheckAddress(addressByUser *models.Command) error {
@@ -25,7 +26,7 @@ func (d *Database) CheckAddress(addressByUser *models.Command) error {
}
normalizedInput := utils.NormalizeAddress(addressByUser.DeliveryAddress)
for _, c := range corrections {
if utils.NormalizeAddress(c.InvalidAddress) == normalizedInput {
if strings.EqualFold(utils.NormalizeAddress(c.InvalidAddress), normalizedInput) {
addressByUser.DeliveryAddress = c.CorrectAddress
return fmt.Errorf("adresse invalide %s", c.CorrectAddress)
}