Skip to content

Commit

Permalink
Merge pull request #2792 from owid/owid-feedback-worker
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelgerber authored Oct 24, 2023
2 parents b1cf2a2 + b5e46d3 commit 48214ce
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions site/Feedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand Down

0 comments on commit 48214ce

Please sign in to comment.