From b5e46d3300db22d2705594b239962830708bff7d Mon Sep 17 00:00:00 2001 From: Marcel Gerber Date: Wed, 18 Oct 2023 16:43:54 +0200 Subject: [PATCH] enhance: use new CF worker for sending feedback --- site/Feedback.tsx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/site/Feedback.tsx b/site/Feedback.tsx index d5296ae5fb9..ec638dc65a9 100644 --- a/site/Feedback.tsx +++ b/site/Feedback.tsx @@ -18,14 +18,11 @@ const sendFeedback = async (feedback: Feedback) => { environment: `Current URL: ${window.location.href}\nUser Agent: ${navigator.userAgent}\nViewport: ${window.innerWidth}x${window.innerHeight}`, } - return await fetch( - "https://owid-feedback.netlify.app/.netlify/functions/hello", - { - method: "POST", - headers: { "Content-Type": "application/json;charset=UTF-8" }, - body: JSON.stringify(json), - } - ).then((res) => { + return await fetch("https://feedback.owid.io", { + method: "POST", + headers: { "Content-Type": "application/json;charset=UTF-8" }, + body: JSON.stringify(json), + }).then((res) => { if (!res.ok) throw new Error( `Sending feedback failed: ${res.status} ${res.statusText}`