@@ -53,7 +53,6 @@ const RequestEditPage = () => {
|
||||
process.env.NODE_ENV === "development"
|
||||
? process.env.REACT_APP_API_DEV
|
||||
: process.env.REACT_APP_API_PROD;
|
||||
console.log("documentId", documentId);
|
||||
|
||||
useEffect(() => {
|
||||
if (!appUserId || !documentId) {
|
||||
@@ -127,14 +126,14 @@ const RequestEditPage = () => {
|
||||
async function getDocx() {
|
||||
const docId = documentId;
|
||||
const reqType = documentType;
|
||||
fetch(`${apiUrl}/getDocx/${docId}/${reqType}`, {
|
||||
fetch(`${apiUrl}/v1/get-docx/${docId}/${reqType}`, {
|
||||
method: "GET",
|
||||
}).then((response) => {
|
||||
response.blob().then((blob) => {
|
||||
let url = window.URL.createObjectURL(blob);
|
||||
let a = window.document.createElement("a");
|
||||
a.href = url;
|
||||
a.download = `${reqType}-repsonse.docx`;
|
||||
a.download = `interrogatories-req-prod.docx`;
|
||||
a.click();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user