[st] - 입력단 메뉴 작업중

This commit is contained in:
2026-06-15 10:38:33 +09:00
parent 49e42757bc
commit e3eb542e59
43 changed files with 7637 additions and 947 deletions
+1
View File
@@ -1 +1,2 @@
export { client } from "./client";
export { withAuthHeader } from "./with-auth-header";
@@ -0,0 +1,16 @@
import type { AxiosRequestConfig } from "axios";
import { getToken } from "@/entities/auth/lib/token-manager";
import { CLAIM_NAME } from "@/shared/config";
export function withAuthHeader<T extends AxiosRequestConfig>(config: T = {} as T): T {
const authorization = getToken(CLAIM_NAME);
if (!authorization) return config;
return {
...config,
headers: {
...config.headers,
[CLAIM_NAME]: authorization,
},
};
}