Skip to content

Commit

Permalink
Replaced Rdata with Rerror
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamprakash123 committed Oct 11, 2023
1 parent f5db1a9 commit 533e2cb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Components/ABDM/LinkABHANumberModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,12 @@ const ScanABHAQRSection = ({
onClick={async () => {
let response = null;
let Rdata = null;
let Rerror = null;

switch (selectedAuthMethod) {
case "MOBILE_OTP":
{
const { res, data } = await request(
const { res, data, error } = await request(
routes.abha.confirmWithMobileOtp,
{
body: {
Expand All @@ -259,12 +260,13 @@ const ScanABHAQRSection = ({
);
response = res;
Rdata = data;
Rerror = error;
}
break;

case "AADHAAR_OTP":
{
const { res, data } = await request(
const { res, data, error } = await request(
routes.abha.confirmWithAadhaarOtp,
{
body: {
Expand All @@ -276,6 +278,7 @@ const ScanABHAQRSection = ({
);
response = res;
Rdata = data;
Rerror = error;
}
break;
}
Expand All @@ -287,7 +290,7 @@ const ScanABHAQRSection = ({
});
} else {
Notify.Error({
msg: Rdata?.message ?? "Something went wrong!",
msg: Rerror ?? "Something went wrong!",
});
}
}}
Expand Down

0 comments on commit 533e2cb

Please sign in to comment.