Skip to content

Commit

Permalink
Added request Info in generate request
Browse files Browse the repository at this point in the history
  • Loading branch information
ashish-egov authored Oct 15, 2024
1 parent 842be89 commit 363858a
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ const UploadDataCustom = React.memo(({ formData, onSelect, ...props }) => {

useEffect(() => {
const fetchData = async () => {
const ts = new Date().getTime();
const reqCriteria = {
url: `/project-factory/v1/data/_generate`,
params: {
Expand All @@ -137,6 +138,12 @@ const UploadDataCustom = React.memo(({ formData, onSelect, ...props }) => {
hierarchyType: boundaryHierarchy,
campaignId: id,
source: "microplan",
},
body: {
RequestInfo : {
authToken: Digit.UserService.getUser().access_token,
msgId: `${ts}|${Digit.StoreData.getCurrentLanguage()}`
}
}
};

Expand All @@ -148,8 +155,9 @@ const UploadDataCustom = React.memo(({ formData, onSelect, ...props }) => {
console.error("Error fetching data:", error);
}
};

fetchData();
if(boundaryHierarchy){
fetchData();
}
}, [type]);


Expand Down

0 comments on commit 363858a

Please sign in to comment.