forked from v4l3n71n/covas-bo
complete profil 100%
This commit is contained in:
parent
e52ed75ea3
commit
b4fa747714
@ -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">
|
||||
|
@ -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);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user