diff --git a/src/api/send-mail/index.tsx b/src/api/send-mail/index.tsx index 5f61276..9c75440 100644 --- a/src/api/send-mail/index.tsx +++ b/src/api/send-mail/index.tsx @@ -51,9 +51,8 @@ function EmailSender({
${userResponse}
`, }; - console.log(contribution); - // const responseBrevo = await fetch("/email/", { - const responseBrevo = await fetch("https://api.brevo.com/v3/smtp/email", { + const responseBrevo = await fetch("/email/", { + // const responseBrevo = await fetch("https://api.brevo.com/v3/smtp/email", { method: "POST", headers: { "api-key": import.meta.env.VITE_BREVO_API_AUTHORIZATION, @@ -71,15 +70,14 @@ function EmailSender({ responseFrom: selectedProfile, }; - // const responseScanR = await fetch(`/api/${basePath}/${contribution._id}`, { - const responseScanR = await fetch( - `https://scanr-api.dataesr.ovh/${basePath}/${contribution._id}`, - { - method: "PATCH", - headers: postHeaders, - body: JSON.stringify(dataForScanR), - } - ); + const responseScanR = await fetch(`/api/${basePath}/${contribution._id}`, { + // const responseScanR = await fetch( + // `https://scanr-api.dataesr.ovh/${basePath}/${contribution._id}`, + // { + method: "PATCH", + headers: postHeaders, + body: JSON.stringify(dataForScanR), + }); if (!responseScanR.ok) { throw new Error(`HTTP error! status: ${responseScanR.status}`); diff --git a/src/api/utils/buildURL.tsx b/src/api/utils/buildURL.tsx index 262e689..1b65271 100644 --- a/src/api/utils/buildURL.tsx +++ b/src/api/utils/buildURL.tsx @@ -29,6 +29,6 @@ export const buildURL = ( const whereQuery = Object.keys(where).length > 0 ? `&where=${JSON.stringify(where)}` : ""; - // return `/api/${baseUrl}?${sorted}&page=${page}&max_results=20${whereQuery}`; - return `https://scanr-api.dataesr.ovh/${baseUrl}?${sorted}&page=${page}&max_results=20${whereQuery}`; + return `/api/${baseUrl}?${sorted}&page=${page}&max_results=20${whereQuery}`; + // return `https://scanr-api.dataesr.ovh/${baseUrl}?${sorted}&page=${page}&max_results=20${whereQuery}`; }; diff --git a/src/components/edit-modal/index.tsx b/src/components/edit-modal/index.tsx index d65e5a6..292f3f7 100644 --- a/src/components/edit-modal/index.tsx +++ b/src/components/edit-modal/index.tsx @@ -78,8 +78,8 @@ const EditModal: React.FC