Add publish checkbox state to saveProfile POST
This commit is contained in:
+3
-1
@@ -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.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user