Fix env variables

This commit is contained in:
1ilit 2024-03-15 21:09:50 +02:00
parent 725f01d8da
commit 7a406eb6d3
3 changed files with 3 additions and 2 deletions

1
.env.sample Normal file
View File

@ -0,0 +1 @@
VITE_BACKEND_URL=http://backend.com

View File

@ -65,7 +65,7 @@ function Form({ theme }) {
editor.update(() => { editor.update(() => {
const sendMail = async () => { const sendMail = async () => {
await axios 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}`, subject: `[BUG REPORT]: ${data.title}`,
message: $generateHtmlFromNodes(editor), message: $generateHtmlFromNodes(editor),
attachments: data.attachments, attachments: data.attachments,

View File

@ -69,7 +69,7 @@ function SurveyForm({ theme }) {
editor.update(() => { editor.update(() => {
const sendMail = async () => { const sendMail = async () => {
await axios 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()}`, subject: `[SURVEY]: ${new Date().toDateString()}`,
message: `${Object.keys(form).map( message: `${Object.keys(form).map(
(k) => `<div>${questions[k]}</div><div>${form[k]}</div>` (k) => `<div>${questions[k]}</div><div>${form[k]}</div>`