Fix: Add header in every API call.
" 'X-Login-Type': 'IB',"
This commit is contained in:
@@ -68,6 +68,7 @@ export default function AccountDetails() {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-Login-Type": "IB",
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -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}`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -26,6 +26,7 @@ export default function AccountSummary() {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-Login-Type": "IB",
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -113,6 +113,7 @@ const AddBeneficiary: React.FC = () => {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-Login-Type": "IB",
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -128,6 +128,7 @@
|
||||
// method: "GET",
|
||||
// headers: {
|
||||
// "Content-Type": "application/json",
|
||||
// "X-Login-Type": "IB",
|
||||
// Authorization: `Bearer ${token}`,
|
||||
// },
|
||||
// });
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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}`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -66,6 +66,7 @@ export default function Home() {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
"X-Login-Type": "IB",
|
||||
'Authorization': `Bearer ${token}`
|
||||
},
|
||||
});
|
||||
|
||||
@@ -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}`
|
||||
},
|
||||
});
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -40,6 +40,7 @@ export default function ViewProfile() {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-Login-Type": "IB",
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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 }),
|
||||
|
||||
Reference in New Issue
Block a user