diff --git a/client/src/const/serverPath.ts b/client/src/const/serverPath.ts index cb0dc7b..d93fd53 100644 --- a/client/src/const/serverPath.ts +++ b/client/src/const/serverPath.ts @@ -29,7 +29,12 @@ export const LOGOUT_BFF = "/api/auth/logout-internal" as const; /** * 게시물리스트를 받아오거나, 작성하는 Path */ -export const POST_LIST = "/posts" as const; +export const POST_LIST = "/posts/old" as const; + +/** + * 게시물리스트를 받아오거나, 작성하는 Path 버전2 (Breaking Change) + */ +export const POST_LIST_V2 = "/posts" as const; /** * ID(pk) 를 입력받아 해당 포스트를 지우는 URL */ diff --git a/client/src/queries/post/useGetPostListInfiniteQuery.tsx b/client/src/queries/post/useGetPostListInfiniteQuery.tsx index f7a5499..874eeff 100644 --- a/client/src/queries/post/useGetPostListInfiniteQuery.tsx +++ b/client/src/queries/post/useGetPostListInfiniteQuery.tsx @@ -3,6 +3,7 @@ import axios from "@/libs/axios"; import { PostInterface } from "@/types/post/PostInterface"; import { AxiosRequestConfig } from "axios"; import getTokenFromLocalStorage from "@/utils/getTokenFromLocalStorage"; +import { POST_LIST } from "@/const/serverPath"; export interface UseGetPostListQueryInterface extends GetPostListOptions { initialData?: AugmentedGetPostListResponse; @@ -80,7 +81,7 @@ export const getPostListQueryFn = async ({ }: GetPostListOptions & { headers?: AxiosRequestConfig["headers"]; }): Promise => { - const { data } = await axios.get("/posts", { + const { data } = await axios.get(POST_LIST, { baseURL: process.env.NEXT_PUBLIC_BASE_URL, params: { page, size, searchKeyword, searchUserNos }, headers,