Skip to content

Commit

Permalink
Fix: middleware의 fetchResponse.ok 분기 로직을 제거한다
Browse files Browse the repository at this point in the history
  • Loading branch information
HaJunRyu committed Jan 28, 2024
1 parent 6225101 commit 640d786
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ export async function middleware(request: NextRequest) {
`https://api.dev-recruit.mash-up.kr/api/v1/applications/schedule/${CURRENT_GENERATION}`,
);

if (!recruitScheduleResponse.ok) {
const url = request.nextUrl.clone();
url.pathname = HOME_PAGE;
return NextResponse.redirect(url);
}

const { data: recruitSchedules }: { data: RecruitScheduleArray } =
await recruitScheduleResponse.json();

Expand Down

0 comments on commit 640d786

Please sign in to comment.