chore: build
Backend - Build & Lint / build (push) Has been cancelled

This commit is contained in:
2026-06-24 15:40:01 +02:00
parent 26cd84a334
commit 5d92316093
5 changed files with 64 additions and 31 deletions
+8
View File
@@ -838,6 +838,14 @@ func CreateUser(c *gin.Context) {
return
}
hashed, err := bcrypt.GenerateFromPassword([]byte(user.Password), bcrypt.DefaultCost)
if err != nil {
log.Printf("❌ [CREATE_USER] Erreur bcrypt: %v", err)
c.JSON(http.StatusInternalServerError, gin.H{"error": "Erreur traitement mot de passe"})
return
}
user.Password = string(hashed)
if err := database.CreateUser(&user); err != nil {
log.Printf("❌ [CREATE_USER] Erreur: %v", err)
c.JSON(http.StatusInternalServerError, gin.H{"error": "Erreur création"})