Skip to content

Commit 5124421

Browse files
committed
fix : fetch 실패시 빌드 막도록 수정
1 parent 06914bd commit 5124421

File tree

3 files changed

+0
-13
lines changed

3 files changed

+0
-13
lines changed

src/apis/universities/server/getSearchUniversitiesByText.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ export const getUniversitiesByText = async (value: string): Promise<ListUniversi
2323

2424
export const getAllUniversities = async (): Promise<ListUniversity[]> => {
2525
const universities = await getUniversitiesByText("");
26-
27-
if (!universities || universities.length === 0) {
28-
throw new Error("Failed to fetch universities: empty response");
29-
}
30-
3126
return universities;
3227
};
3328

src/app/(home)/page.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ const HomePage = async () => {
7979
// 권역별 전체 대학 리스트를 미리 가져와 빌드합니다
8080
const allRegionsUniversityList = await getCategorizedUniversities();
8181

82-
if (!allRegionsUniversityList || Object.keys(allRegionsUniversityList).length === 0) {
83-
throw new Error("Failed to fetch categorized universities for home page");
84-
}
85-
8682
return (
8783
<>
8884
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(structuredData) }} />

src/app/university/[id]/page.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ export const revalidate = false;
1212
export async function generateStaticParams() {
1313
const universities = await getAllUniversities();
1414

15-
if (!universities || universities.length === 0) {
16-
throw new Error("Failed to fetch universities for static generation");
17-
}
18-
1915
return universities.map((university) => ({
2016
id: String(university.id),
2117
}));

0 commit comments

Comments
 (0)