diff --git a/js/main.js b/js/main.js index 2acd2cb..d7f2ab5 100644 --- a/js/main.js +++ b/js/main.js @@ -312,13 +312,15 @@ async function saveProfile() { image: document.getElementById('profile-image').value, location: document.getElementById('profile-location').value, Description: document.getElementById('profile-description').value, - sessionid: getCookie('sessionid') + sessionid: getCookie('sessionid'), + publish: document.getElementById('profile-publish').checked }) }); console.log('saveProfile response:', response.status, await response.clone().json()); if (response.ok) { alert('Profil erfolgreich gespeichert!'); closeProfileModal(); + checkSession(); } else { alert('Fehler beim Speichern.'); }