Skip to content

Commit caa1dfa

Browse files
changed callwwebhook
1 parent eb01a0b commit caa1dfa

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

microfrontends/SignDocuments/src/Component/PdfRequestFiles.js

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,10 @@ function PdfRequestFiles() {
612612
.then(async (result) => {
613613
const res = result.data;
614614
if (res) {
615+
const currentDecline = {
616+
currnt: "YouDeclined",
617+
isDeclined: true
618+
};
615619
const params = {
616620
event: "declined",
617621
body: {
@@ -628,24 +632,23 @@ function PdfRequestFiles() {
628632
declinedAt: new Date()
629633
}
630634
};
631-
const res = await axios.post(
632-
`${localStorage.getItem("baseUrl")}functions/callwebhook`,
633-
params,
634-
{
635-
headers: {
636-
"Content-Type": "application/json",
637-
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
638-
sessiontoken: localStorage.getItem("accesstoken")
639-
}
640-
}
641-
);
642-
console.log("res ", res.data);
643-
const currentDecline = {
644-
currnt: "YouDeclined",
645-
isDeclined: true
646-
};
647635
setIsDecline(currentDecline);
648636
setIsUiLoading(false);
637+
try {
638+
await axios.post(
639+
`${localStorage.getItem("baseUrl")}functions/callwebhook`,
640+
params,
641+
{
642+
headers: {
643+
"Content-Type": "application/json",
644+
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
645+
sessiontoken: localStorage.getItem("accesstoken")
646+
}
647+
}
648+
);
649+
} catch (err) {
650+
console.log("Err ", err);
651+
}
649652
}
650653
})
651654
.catch((err) => {

0 commit comments

Comments
 (0)