diff options
author | MrArmonius <mrarmonius@gmail.com> | 2021-07-30 16:30:15 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-08-16 12:54:08 +0200 |
commit | f00702b51c8904f9fb42a90a6e22301ae8d4014a (patch) | |
tree | e3d8364b3a51f3498eccf55f9e636114b3005d9b /profile.go | |
parent | a2a484daba1ef42d82f596a989caf203ee9a370f (diff) | |
download | guichet-f00702b51c8904f9fb42a90a6e22301ae8d4014a.tar.gz guichet-f00702b51c8904f9fb42a90a6e22301ae8d4014a.zip |
Correction Review Alex
Change json Identifiant to ID
Diffstat (limited to 'profile.go')
-rw-r--r-- | profile.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -56,12 +56,12 @@ func handleProfile(w http.ResponseWriter, r *http.Request) { } data.Visibility = visible - ok, name, err := uploadImage(w, r, login) + name, err := uploadImage(w, r, login) if err != nil { data.ErrorMessage = err.Error() } - if ok { + if name != "" { data.NameImage = name } @@ -71,8 +71,8 @@ func handleProfile(w http.ResponseWriter, r *http.Request) { modify_request.Replace("sn", []string{data.Surname}) modify_request.Replace("description", []string{data.Description}) modify_request.Replace("visibility", []string{data.Visibility}) - if ok { - modify_request.Replace("profilImage", []string{data.NameImage}) + if name != "" { + modify_request.Replace(PROFILE_PICTURE_FIELD_NAME, []string{data.NameImage}) } err = login.conn.Modify(modify_request) |