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]}
`