diff --git a/web/html/user.html b/web/html/user.html index a24d985..cabd929 100644 --- a/web/html/user.html +++ b/web/html/user.html @@ -155,7 +155,7 @@
Mot de passe - +
diff --git a/web/js/user.js b/web/js/user.js index caaa162..53929a5 100644 --- a/web/js/user.js +++ b/web/js/user.js @@ -139,12 +139,22 @@ if(id.length > 0){ } instance({ - method : "put", + method : "patch", url:"users/"+id, withCredentials: true, data: dataPut }).then(function(response){ - console.log(response); + switch(response.status){ + case 200: + location.reload(); + break; + case 304: + console.log("non modifie"); + break; + default: + console.log("error inconnue"); + break + } }).catch(function(error){ console.log(error); });