Changes
Co-authored-by: Ichitux <17677572+Ichitux@users.noreply.github.com>
This commit is contained in:
@@ -56,15 +56,12 @@ const BookingSection = () => {
|
|||||||
setStatus("loading");
|
setStatus("loading");
|
||||||
try {
|
try {
|
||||||
console.log("[Booking] Sending to:", WEBHOOK_URL);
|
console.log("[Booking] Sending to:", WEBHOOK_URL);
|
||||||
console.log("[Booking] Payload:", JSON.stringify(result.data));
|
|
||||||
const res = await fetch(WEBHOOK_URL, {
|
const res = await fetch(WEBHOOK_URL, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
body: JSON.stringify(result.data),
|
body: JSON.stringify(result.data),
|
||||||
});
|
});
|
||||||
console.log("[Booking] Response status:", res.status, res.statusText);
|
console.log("[Booking] Response status:", res.status);
|
||||||
const text = await res.text();
|
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
||||||
console.log("[Booking] Response body:", text);
|
|
||||||
if (!res.ok) throw new Error(`HTTP ${res.status}: ${text}`);
|
if (!res.ok) throw new Error(`HTTP ${res.status}: ${text}`);
|
||||||
setStatus("success");
|
setStatus("success");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user