fix: eMandate login page

fix: reserver url
This commit is contained in:
2025-12-08 16:41:30 +05:30
parent 74297959d7
commit df0058541e
2 changed files with 6 additions and 3 deletions

View File

@@ -110,6 +110,7 @@ function LoginEmandate() {
return; return;
} }
try { try {
setIsLogging(true);
const response = await fetch('/api/auth/login', { const response = await fetch('/api/auth/login', {
method: 'POST', method: 'POST',
headers: { headers: {
@@ -134,9 +135,9 @@ function LoginEmandate() {
localStorage.removeItem("mandate_token"); localStorage.removeItem("mandate_token");
localStorage.clear(); localStorage.clear();
sessionStorage.clear(); sessionStorage.clear();
setIsLogging(false);
return; return;
} }
setIsLogging(true);
if (response.ok) { if (response.ok) {
// console.log(data); // console.log(data);
const token = data.token; const token = data.token;
@@ -150,6 +151,7 @@ function LoginEmandate() {
message: "Please go to Internet Banking, set your credentials, and then try logging in here again.", message: "Please go to Internet Banking, set your credentials, and then try logging in here again.",
autoClose: 5000, autoClose: 5000,
}); });
setIsLogging(false);
} }
else { else {
console.log("Start to validate soft tech data"); console.log("Start to validate soft tech data");
@@ -181,6 +183,7 @@ function LoginEmandate() {
message: "Failed to validate.Please try again later.", message: "Failed to validate.Please try again later.",
autoClose: 5000, autoClose: 5000,
}); });
setIsLogging(false);
} }
} }
} }
@@ -204,6 +207,7 @@ function LoginEmandate() {
message: "Internal Server Error,Please try again Later", message: "Internal Server Error,Please try again Later",
autoClose: 5000, autoClose: 5000,
}); });
setIsLogging(false);
return; return;
} }
} }
@@ -451,4 +455,3 @@ export default function Login() {
</Suspense> </Suspense>
); );
} }

View File

@@ -128,7 +128,7 @@ export default function VerifyOtpPage() {
if (success) { if (success) {
const encoded_data = localStorage.getItem("Validate_data"); const encoded_data = localStorage.getItem("Validate_data");
const res = await fetch( const res = await fetch(
`https://apiemandate.kccb.in:9035/Emandate/auth-cbs-resp?data=${encoded_data}`, `https://apiemandate.kccb.in:9035/EMandate/auth-cbs-resp?data=${encoded_data}`,
{ {
method: "POST", method: "POST",
headers: { headers: {