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,
|
image: document.getElementById('profile-image').value,
|
||||||
location: document.getElementById('profile-location').value,
|
location: document.getElementById('profile-location').value,
|
||||||
Description: document.getElementById('profile-description').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());
|
console.log('saveProfile response:', response.status, await response.clone().json());
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
alert('Profil erfolgreich gespeichert!');
|
alert('Profil erfolgreich gespeichert!');
|
||||||
closeProfileModal();
|
closeProfileModal();
|
||||||
|
checkSession();
|
||||||
} else {
|
} else {
|
||||||
alert('Fehler beim Speichern.');
|
alert('Fehler beim Speichern.');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user