From 7a406eb6d3b172ed4074fb482dcf494cfc62d46e Mon Sep 17 00:00:00 2001 From: 1ilit Date: Fri, 15 Mar 2024 21:09:50 +0200 Subject: [PATCH] Fix env variables --- .env.sample | 1 + src/pages/BugReport.jsx | 2 +- src/pages/Survey.jsx | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .env.sample diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..c87806f --- /dev/null +++ b/.env.sample @@ -0,0 +1 @@ +VITE_BACKEND_URL=http://backend.com \ No newline at end of file diff --git a/src/pages/BugReport.jsx b/src/pages/BugReport.jsx index ac3250f..58bfc26 100644 --- a/src/pages/BugReport.jsx +++ b/src/pages/BugReport.jsx @@ -65,7 +65,7 @@ function Form({ theme }) { editor.update(() => { const sendMail = async () => { await axios - .post(`${import.meta.env.VITE_API_BACKEND_URL}/send_email`, { + .post(`${import.meta.env.VITE_BACKEND_URL}/send_email`, { subject: `[BUG REPORT]: ${data.title}`, message: $generateHtmlFromNodes(editor), attachments: data.attachments, diff --git a/src/pages/Survey.jsx b/src/pages/Survey.jsx index 65fe80c..cc3aa01 100644 --- a/src/pages/Survey.jsx +++ b/src/pages/Survey.jsx @@ -69,7 +69,7 @@ function SurveyForm({ theme }) { editor.update(() => { const sendMail = async () => { await axios - .post(`${import.meta.env.VITE_API_BACKEND_URL}/send_email`, { + .post(`${import.meta.env.VITE_BACKEND_URL}/send_email`, { subject: `[SURVEY]: ${new Date().toDateString()}`, message: `${Object.keys(form).map( (k) => `
${questions[k]}
${form[k]}
`