complete profil 100%

This commit is contained in:
Valentin CZERYBA 2022-08-11 21:33:24 +02:00
parent e52ed75ea3
commit b4fa747714
2 changed files with 13 additions and 3 deletions

View File

@ -155,7 +155,7 @@
<div class="input-group mb-3">
<span class="input-group-text" id="passwordUpdate">Mot de passe</span>
<input id="passwordUpdateInput" type="password" class="form-control" placeholder="Pseudo" aria-label="Pseudo" aria-describedby="passwordUpdate">
<input id="passwordUpdateInput" type="password" class="form-control" placeholder="Mot de passe" aria-label="Mot de passe" aria-describedby="passwordUpdate">
</div>
<div class="input-group mb-3">

View File

@ -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);
});