2025-05-09 10:45:32 +00:00
|
|
|
import type { ILoginResponseDTO } from "@erp/auth";
|
2025-05-05 17:11:44 +00:00
|
|
|
import secureLocalStorage from "react-secure-storage";
|
|
|
|
|
|
|
|
|
|
export const getApiAuthorization = () => {
|
2025-05-09 10:45:32 +00:00
|
|
|
const authInfo = secureLocalStorage.getItem("uecko.auth") as ILoginResponseDTO;
|
2025-05-05 17:11:44 +00:00
|
|
|
|
2025-05-09 10:45:32 +00:00
|
|
|
return authInfo?.token ? `Bearer ${authInfo.token}` : "";
|
2025-05-05 17:11:44 +00:00
|
|
|
};
|