diff --git a/src/Components/Document/DocEditPage.js b/src/Components/Document/DocEditPage.js index 7a4062f..0e7f9dd 100644 --- a/src/Components/Document/DocEditPage.js +++ b/src/Components/Document/DocEditPage.js @@ -247,8 +247,7 @@ const DocEditPage = (props) => { async function cleanUpDocx() { const docId = documentId; - const reqType = docType; - fetch(`${apiUrl}/cleanUpDocx/${docId}/${reqType}`, { + fetch(`${apiUrl}/cleanUpDocx/${docId}`, { method: "GET", }) .then((response) => { @@ -262,6 +261,10 @@ const DocEditPage = (props) => { async function createAndReturnDocx() { setIsBusy(true); const response = await handleCreateDocx(); + console.log( + "why is this a fucking array~~~~~~~~~~~~~~~~~~~~~~~~~~>", + responses + ); if (response?.status === 200) { setTimeout(getDocx, 5000); setTimeout(cleanUpDocx, 10000); @@ -274,7 +277,7 @@ const DocEditPage = (props) => { async function getDocx() { const docId = documentId; const reqType = docType; - fetch(`${apiUrl}/getDocx/${docId}/${reqType}`, { + fetch(`${apiUrl}/v1/get-docx/${docId}/${reqType}`, { method: "GET", }).then((response) => { response.blob().then((blob) => { @@ -356,29 +359,11 @@ const DocEditPage = (props) => { }, } ); - return response; } + return response; } catch (err) { console.log("err inpostDocxData", err); } - - /* - try { - const response = await fetch( - `${apiUrl}/v1/generate-request-docx/${docId}`, - { - method: "POST", - headers: { - Accept: "application/json", - "Content-Type": "application/json", - }, - } - ); - return response; - } catch (error) { - console.error("Error sending responses to the server:", error); - } - */ } const handleConfirmReport = () => {