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