We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce13043 commit 44d6570Copy full SHA for 44d6570
src/pages/user/ClubDetail/api/clubDetail.ts
@@ -1,11 +1,11 @@
1
import type { ClubDetail } from '../types/clubDetail';
2
3
-export const fetchClubDetail = async (clubId: string | number): Promise<ClubDetail> => {
+export const fetchClubDetail = async (clubId: number): Promise<ClubDetail> => {
4
const url = `/api/clubs/${clubId}`;
5
- const response = await fetch(url);
+ const res = await fetch(url);
6
7
- if (!response.ok) {
+ if (!res.ok) {
8
throw new Error('동아리 상세 정보를 가져오는데 실패했습니다.');
9
}
10
- return response.json() as Promise<ClubDetail>;
+ return res.json() as Promise<ClubDetail>;
11
};
0 commit comments