[common/components] feat: raw fetch 헤더에 토큰 주입
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { getAuthHeaders } from "@/lib/auth-header";
|
||||
import { ENDPOINT } from "../config";
|
||||
import { getConfig } from "@common/config";
|
||||
|
||||
@@ -34,9 +35,8 @@ export const getMenuList = async (siteId: string): Promise<MenuItem[]> => {
|
||||
`${BASE_URL}${ENDPOINT.CMS_SERVICE.MENU_ROLES}/${siteId}`,
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
headers: getAuthHeaders(),
|
||||
credentials: "include",
|
||||
},
|
||||
);
|
||||
return response.json();
|
||||
@@ -49,9 +49,8 @@ export const getPreviewTreeMenuList = async (
|
||||
`${BASE_URL}${ENDPOINT.CMS_SERVICE.MENUS}/${siteId}/tree/preview`,
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
headers: getAuthHeaders(),
|
||||
credentials: "include",
|
||||
},
|
||||
);
|
||||
return response.json();
|
||||
@@ -64,9 +63,8 @@ export const getAnonymouseMenuList = async (
|
||||
`${BASE_URL}${ENDPOINT.CMS_SERVICE.MENU_ANONYMOUS}/user/${siteId}`,
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
headers: getAuthHeaders(),
|
||||
credentials: "include",
|
||||
},
|
||||
);
|
||||
return response.json();
|
||||
|
||||
Reference in New Issue
Block a user