Skip to content

Commit 44d6570

Browse files
committed
refactor: proxy 도입으로 api 상대경로로 수정
1 parent ce13043 commit 44d6570

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import type { ClubDetail } from '../types/clubDetail';
22

3-
export const fetchClubDetail = async (clubId: string | number): Promise<ClubDetail> => {
3+
export const fetchClubDetail = async (clubId: number): Promise<ClubDetail> => {
44
const url = `/api/clubs/${clubId}`;
5-
const response = await fetch(url);
5+
const res = await fetch(url);
66

7-
if (!response.ok) {
7+
if (!res.ok) {
88
throw new Error('동아리 상세 정보를 가져오는데 실패했습니다.');
99
}
10-
return response.json() as Promise<ClubDetail>;
10+
return res.json() as Promise<ClubDetail>;
1111
};

0 commit comments

Comments
 (0)