backoffice/web/js/users.js

18 lines
507 B
JavaScript
Raw Normal View History

2022-08-04 00:03:57 +02:00
checkToken();
2022-08-05 21:20:14 +02:00
signOut();
2022-08-05 23:39:15 +02:00
var id = getQuery("id");
2022-08-05 21:20:14 +02:00
2022-08-05 23:39:15 +02:00
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);
2022-08-05 21:20:14 +02:00
2022-08-05 23:39:15 +02:00
});
}