refactor: shared api client 추가 및 response types 추가#75
Open
refactor: shared api client 추가 및 response types 추가#75
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 개요
공통 API 호출 규약을 맞추기 위해 shared/lib/api 레이어를 추가하고, ApiResponse/ApiError 타입과 apiRequest 공통 클라이언트를 도입했습니다. 개발 환경에서 프로필/리뷰 관련 요청이 정상적으로 목킹되도록 mocks/handlers/index.ts 핸들러 구성을 정리했습니다.
🔗 관련 이슈
🛠️ 변경 사항 (Checklist)
✅ 아래 내용을 한 번 더 점검해 주세요
1. 의도와 가독성 (Naming & Readability)
2. 타입과 논리 (Type Safety & Logic)
any사용을 지양하고, 모든 함수의 반환 타입을 명시했나요?null/undefined), 에러가 발생할 경우를 처리했나요?3. 코드 다이어트 (Clean-up)
console.log나 사용하지 않는import를 모두 지웠나요?4. 지속 가능성 (Sustainability)
README업데이트가 필요한가요?💭 회고 (Optional)
백엔드 스펙 확정 전 단계에서 공통 계약과 클라이언트를 먼저 정리해, 이후 도메인 API 마이그레이션과 페이지 개발을 병렬로 진행하기 쉬운 상태를 만들었습니다. 다음 단계는 머지 이후 최신 기준으로 각 feature API를 apiRequest 패턴으로 점진 이관하는 것입니다.