generated from dwd/boilarplate-astro-tailwind
pull/2/head
parent
7b514fa08c
commit
d88ec02a13
|
@ -80,7 +80,7 @@ import Layout from "../layouts/Layout.astro";
|
||||||
referrer: document.referrer
|
referrer: document.referrer
|
||||||
};
|
};
|
||||||
|
|
||||||
fetch('https://192.168.0.166/v3/contact-form-processor/', {
|
fetch('http://192.168.0.166:2053/v3/contact-form-processor/', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
|
@ -90,14 +90,14 @@ import Layout from "../layouts/Layout.astro";
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (data.success) {
|
if (data.success) {
|
||||||
alert('Data submitted successfully');
|
console.log('Data submitted successfully');
|
||||||
} else {
|
} else {
|
||||||
alert('Error: ' + data.message);
|
console.log('Error: ' + data.message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
alert('An error occurred while submitting the form');
|
console.log('An error occurred while submitting the form');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue