[common/components] feat: raw fetch 헤더에 토큰 주입

This commit is contained in:
2026-07-20 18:35:14 +09:00
parent 2f0448a98e
commit 196d31a084
4 changed files with 37 additions and 18 deletions
+3 -3
View File
@@ -1,5 +1,6 @@
import { getConfig } from "@common/config";
import { ENDPOINT } from "../config";
import { getAuthHeaders } from "@/lib/auth-header";
export interface Banner {
bnrSn: number;
@@ -22,9 +23,8 @@ export const getBannerList = async (siteId: string): Promise<Banner[]> => {
`${BASE_URL}${ENDPOINT.CMS_SERVICE.BANNERS}/${siteId}`,
{
method: "GET",
headers: {
"Content-Type": "application/json",
},
headers: getAuthHeaders(),
credentials: "include",
},
);
return response.json();