20 lines
500 B
TypeScript
20 lines
500 B
TypeScript
export { apiGetMasterBank };
|
|
|
|
const apiGetMasterBank = async () => {
|
|
const { token } = await fetch("/api/get-cookie").then((res) => res.json());
|
|
if (!token) return await token.json().catch(() => null);
|
|
|
|
const respone = await fetch(`/api/master/bank`, {
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
Accept: "application/json",
|
|
"Access-Control-Allow-Origin": "*",
|
|
Authorization: `Bearer ${token}`,
|
|
},
|
|
});
|
|
return await respone.json().catch(() => null);
|
|
};
|
|
|
|
|
|
|