newsletter config try

This commit is contained in:
isUnknown 2025-01-28 13:10:11 +01:00
parent 7e5872aad1
commit 49d48015a8
4 changed files with 29 additions and 20 deletions

View file

@ -20,11 +20,11 @@ const headers = {
}),
};
function send(event) {
async function send(event) {
event.preventDefault();
fetch("/send-newsletter.json", headers)
.then((res) => res.json())
.then((json) => console.log(json));
const response = await fetch("/send-newsletter.json", headers);
const data = await response.json();
console.log(data);
}
</script>