aboutsummaryrefslogtreecommitdiff
path: root/profile.go
diff options
context:
space:
mode:
authorMrArmonius <mrarmonius@gmail.com>2021-07-30 16:30:15 +0200
committerAlex Auvolat <alex@adnab.me>2021-08-16 12:54:08 +0200
commitf00702b51c8904f9fb42a90a6e22301ae8d4014a (patch)
treee3d8364b3a51f3498eccf55f9e636114b3005d9b /profile.go
parenta2a484daba1ef42d82f596a989caf203ee9a370f (diff)
downloadguichet-f00702b51c8904f9fb42a90a6e22301ae8d4014a.tar.gz
guichet-f00702b51c8904f9fb42a90a6e22301ae8d4014a.zip
Correction Review Alex
Change json Identifiant to ID
Diffstat (limited to 'profile.go')
-rw-r--r--profile.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/profile.go b/profile.go
index ab43922..21cfe0a 100644
--- a/profile.go
+++ b/profile.go
@@ -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)