Fix: Add header in every API call.

" 'X-Login-Type': 'IB',"
This commit is contained in:
2025-10-27 11:56:36 +05:30
parent 3f1bbf1a4c
commit 7ba258dc21
25 changed files with 55 additions and 13 deletions

View File

@@ -68,6 +68,7 @@ export default function AccountDetails() {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
});

View File

@@ -43,6 +43,7 @@ export default function AccountStatementPage() {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
})
@@ -128,6 +129,7 @@ export default function AccountStatementPage() {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
});

View File

@@ -26,6 +26,7 @@ export default function AccountSummary() {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
});

View File

@@ -104,6 +104,7 @@ export default function AddBeneficiaryOthers() {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
}
@@ -189,6 +190,7 @@ export default function AddBeneficiaryOthers() {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
}
@@ -258,6 +260,7 @@ export default function AddBeneficiaryOthers() {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({

View File

@@ -113,6 +113,7 @@ const AddBeneficiary: React.FC = () => {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
});

View File

@@ -128,6 +128,7 @@
// method: "GET",
// headers: {
// "Content-Type": "application/json",
// "X-Login-Type": "IB",
// Authorization: `Bearer ${token}`,
// },
// });

View File

@@ -88,6 +88,7 @@ export default function QuickPay() {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
});
@@ -173,6 +174,7 @@ export default function QuickPay() {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
});
@@ -265,6 +267,7 @@ export default function QuickPay() {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({

View File

@@ -85,6 +85,7 @@ export default function SendToBeneficiaryOwn() {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
});
@@ -115,6 +116,7 @@ export default function SendToBeneficiaryOwn() {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
});
@@ -263,6 +265,7 @@ export default function SendToBeneficiaryOwn() {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({

View File

@@ -114,6 +114,7 @@ export default function SendToBeneficiaryOthers() {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
});
@@ -172,6 +173,7 @@ export default function SendToBeneficiaryOthers() {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
});
@@ -309,6 +311,7 @@ export default function SendToBeneficiaryOthers() {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({

View File

@@ -114,7 +114,11 @@ export default function ViewBeneficiary() {
const token = localStorage.getItem("access_token");
const res = await fetch(`/api/beneficiary/${selectedAccount}`, {
method: "DELETE",
headers: { Authorization: `Bearer ${token}` },
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`
},
});
if (res.ok) {
@@ -161,6 +165,7 @@ export default function ViewBeneficiary() {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
});

View File

@@ -66,6 +66,7 @@ export default function Home() {
method: 'GET',
headers: {
'Content-Type': 'application/json',
"X-Login-Type": "IB",
'Authorization': `Bearer ${token}`
},
});

View File

@@ -83,6 +83,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
method: 'GET',
headers: {
'Content-Type': 'application/json',
"X-Login-Type": "IB",
'Authorization': `Bearer ${token}`
},
});

View File

@@ -175,6 +175,7 @@ export default function ChangePassword() {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({

View File

@@ -183,6 +183,7 @@ export default function ChangePassword() {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({

View File

@@ -40,6 +40,7 @@ export default function ViewProfile() {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
});

View File

@@ -190,6 +190,7 @@ export default function ChangePassword() {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({

View File

@@ -63,6 +63,7 @@ export default function SetPreferredNameSimple() {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
});
@@ -167,6 +168,7 @@ export default function SetPreferredNameSimple() {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Login-Type": "IB",
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({ user_name: preferredName }),