diff --git a/front-end/src/components/settings/FeedbackSupportPage.js b/front-end/src/components/settings/FeedbackSupportPage.js index 88f1400..95ef10b 100644 --- a/front-end/src/components/settings/FeedbackSupportPage.js +++ b/front-end/src/components/settings/FeedbackSupportPage.js @@ -28,10 +28,20 @@ const FeedbackSupportPage = () => { category: category, feedback: feedback, }; - const response = await axios.post( - `${process.env.REACT_APP_BACKEND}/feedback/newfeedback`, - requestData - ); + const response = await fetch(`${process.env.REACT_APP_BACKEND}/feedback/newfeedback`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify(requestData) + }) + .then(response => response.json()) + .then(data => { + console.log('Success:', data); + }) + .catch((error) => { + console.error('Error:', error); + }); console.log(`Server response: ${JSON.stringify(response.data, null, 0)}`); setErrorMessage(""); setResponse(response.data); diff --git a/front-end/src/utils/stops.js b/front-end/src/utils/stops.js index 4564876..bbef473 100644 --- a/front-end/src/utils/stops.js +++ b/front-end/src/utils/stops.js @@ -68,7 +68,17 @@ export async function queryStops() { const url = `${localStorage.serviceEndpointHome}/mapGetData.php?${urlParams.toString()}`; try { - const response = await axios.post(url, formData); + const response = await fetch(url, { + method: 'POST', + body: formData + }) + .then(response => response.json()) + .then(data => { + console.log(data); + }) + .catch(error => { + console.error('Error:', error); + }); const data = response.data; if (!data) { throw new Error('empty response');