fix: E mandate validation
This commit is contained in:
@@ -153,11 +153,13 @@ function LoginEmandate() {
|
||||
});
|
||||
}
|
||||
else {
|
||||
console.log("Start to validate soft tech data");
|
||||
const response = await fetch('/api/e-mandate/validation', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-Login-Type': 'eMandate',
|
||||
'Authorization': `Bearer ${localStorage.getItem("mandate_token")}`
|
||||
},
|
||||
body: JSON.stringify({
|
||||
data: localStorage.getItem("Emendate_data"),
|
||||
@@ -167,8 +169,20 @@ function LoginEmandate() {
|
||||
});
|
||||
const result = await response.json();
|
||||
console.log("Validate Result : ", result);
|
||||
if (response.ok) {
|
||||
router.push("/eMandate/mandate_page");
|
||||
}
|
||||
else {
|
||||
console.log(result);
|
||||
notifications.show({
|
||||
withBorder: true,
|
||||
color: "red",
|
||||
title: "Validation failed",
|
||||
message: "Failed to validate.Please try again later.",
|
||||
autoClose: 5000,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
regenerateCaptcha();
|
||||
|
||||
Reference in New Issue
Block a user