Skip to content

Commit a122aa1

Browse files
authored
Merge pull request #284 from manNomi/fix/univ-fetch
fix : serverFetch를 쓰지않는 fetch를 수정하다
2 parents 11d4360 + a08eef6 commit a122aa1

1 file changed

Lines changed: 5 additions & 13 deletions

File tree

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
1-
import { AxiosResponse } from "axios";
2-
3-
import { publicAxiosInstance } from "@/utils/axiosInstance";
1+
import serverFetch from "@/utils/serverFetchUtil";
42

53
import { University } from "@/types/university";
64

7-
/**
8-
* @description 대학 상세 조회 서버 사이드 API 함수
9-
* @param universityInfoForApplyId - 대학 ID
10-
* @returns Promise<University>
11-
*/
12-
export const getUniversityDetail = async (universityInfoForApplyId: number): Promise<University> => {
13-
const response: AxiosResponse<University> = await publicAxiosInstance.get(
14-
`/univ-apply-infos/${universityInfoForApplyId}`,
15-
);
16-
return response.data;
5+
export const getUniversityDetail = async (universityInfoForApplyId: number): Promise<University | undefined> => {
6+
const result = await serverFetch<University>(`/univ-apply-infos/${universityInfoForApplyId}`);
7+
8+
return result.data;
179
};

0 commit comments

Comments
 (0)