1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
letu/public/javascripts/profil.js

19 lines
544 B
JavaScript
Raw Normal View History

document.getElementById("editprofil").addEventListener("submit", e=>{
e.preventDefault();
socket.emit("profileEdit", {
"email": mail,
"firstName": document.getElementById("firstname-input").value,
"lastName": document.getElementById("lastname-input").value,
"newPassword": document.getElementById("new-password").value,
"password": document.getElementById("password").value
});
});
socket.on("profileEdit", data=>{
if(data.error){
alert(data.error.message);
}else{
window.location.href = "/";
}
2020-12-12 18:20:02 +01:00
});