diff --git a/src/Components/Modals/UploadModal.js b/src/Components/Modals/UploadModal.js index 38b63c6..df42c2c 100644 --- a/src/Components/Modals/UploadModal.js +++ b/src/Components/Modals/UploadModal.js @@ -119,49 +119,20 @@ const UploadModal = (props) => { } async function uploadFile(file) { - console.log( - "uploadFile radioValue, clientPosition", - radioValue, - clientPosition - ); if (!clientPosition) { return; } - const now = new Date(); + try { if (radioValue.toLowerCase() === "complaint") { - if (clientPosition === "Plaintiff") { - console.log( - "111111111--------------------------sending POST to:", - `${apiUrl}/v1/gen-disc-request-pl`, - "----------------------------------------at time:", - `${now}` - ); - const response = await fetch(`${apiUrl}/v1/gen-disc-request-pl`, { - method: "POST", - body: file, - }); - const res = response; - return res; - } else if (clientPosition === "Defendant") { - console.log( - "222222222------------------------------sending POST to:", - `${apiUrl}/v1/gen-disc-request-df`, - "----------------------------------------at time:", - `${now}` - ); - const response = await fetch(`${apiUrl}/v1/gen-disc-request-df`, { - method: "POST", - body: file, - }); - const res = response; - return res; - } + console.log("/upload-convert-complaint"); + const response = await fetch(`${apiUrl}/v1/gen-disc-request-out`, { + method: "POST", + body: file, + }); + const res = response; + return res; } else { - console.log( - "3333333333333 -------------------------sending POST to:", - `${apiUrl}/v1/parse-new-req-doc` - ); const response = await fetch(`${apiUrl}/v1/parse-new-req-doc`, { method: "POST", body: file, @@ -220,7 +191,7 @@ const UploadModal = (props) => { const response = await processFile(); saveToDb(response.uuidName); - handleSuccess(docType, response.uuidName); + handleSuccess(docType, response.uuidName, radioValue); return; } catch (err) { console.log("err", err);