up
This commit is contained in:
parent
7c02d23e7d
commit
dfc71d1d03
@ -114,13 +114,10 @@ func LoginHandler(db *gorm.DB) http.HandlerFunc {
|
||||
// 5. Répondre en JSON pour Flutter
|
||||
w.WriteHeader(http.StatusOK)
|
||||
json.NewEncoder(w).Encode(map[string]interface{}{
|
||||
"user": map[string]interface{}{
|
||||
"id": user.ID,
|
||||
"username": user.Username,
|
||||
"email": user.Email,
|
||||
"token": tokenString, // <- virgule nécessaire ici
|
||||
// Ajoute d'autres informations utiles ici si nécessaire
|
||||
},
|
||||
"token": tokenString,
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user