backoffice/web/js/users.js

18 lines
507 B
JavaScript

checkToken();
signOut();
var id = getQuery("id");
if(id.length > 0){
instance.get("users/"+id, {withCredentials: true})
.then(function(response){
var listValue = [ "id", "pseudo", "name", "firstName", "email"];
for (var i=0; i<listValue.length; i++){
document.getElementById(listValue[i]+"UpdateInput").value=response.data[listValue[i]];
}
})
.catch(function(error){
console.log(error);
});
}