Skip to content

Commit

Permalink
chore: 중복 코드 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
healim01 committed Dec 2, 2024
1 parent 79c8932 commit 74654bd
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions frontend/src/utils/mockResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const mockResponse = <T>({ status, body, errorBody, headers }: Props<T>)
return HttpResponse.json({ ...body }, { status, headers });
}

if (status >= 400 && status <= 499) {
if (status >= 400 && status <= 599) {
return HttpResponse.json(
{
...errorBody,
Expand All @@ -23,14 +23,5 @@ export const mockResponse = <T>({ status, body, errorBody, headers }: Props<T>)
);
}

if (status >= 500 && status <= 599) {
return HttpResponse.json(
{
errorBody,
},
{ status },
);
}

return HttpResponse.json({ body }, { status });
};

0 comments on commit 74654bd

Please sign in to comment.