Skip to content

[FEAT] API 연동 에러 수정 - #21

Merged
suwonthugger merged 2 commits into
mainfrom
feat/20-api-error
Jul 28, 2026
Merged

[FEAT] API 연동 에러 수정#21
suwonthugger merged 2 commits into
mainfrom
feat/20-api-error

Conversation

@suwonthugger

@suwonthugger suwonthugger commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

👥 작업 배경 및 목적

🛠️ 주요 변경 사항

  • api 경로 변경

    • api/news -> api/v1/news
  • 검증 기능 아직 미지원으로 mocking api 대신 json 데이터 추가

🧪 테스트 결과 (선택)

  • 로컬 환경 테스트 결과나 실행 화면 스크린샷이 있다면 첨부해 주세요.

Summary by CodeRabbit

  • 개선 사항
    • 검증 데이터가 뉴스 단위와 일별 적중률을 포함한 새로운 데이터 구조로 제공됩니다.
    • 검증 목록은 커서 기반 페이지 이동을 지원하며, 일별 적중률은 전체 추이로 표시됩니다.
    • 뉴스·분석·그래프 기능이 최신 API 경로를 사용하도록 업데이트되었습니다.
  • 버그 수정
    • 개발 환경의 모의 데이터 요청 경로를 최신 API 경로와 일치시켜 관련 화면의 데이터 표시 안정성을 높였습니다.

suwonthugger and others added 2 commits July 29, 2026 00:52
실 백엔드(koslink-api.hwangonjang.com)가 /api/news가 아니라 /api/v1/news
형태의 버전 프리픽스를 요구하는 것을 확인. http.ts의 ky prefix를
/api/v1로 바꾸고, dev 모드에서 여전히 요청을 가로채도록 news/analysis/
graph/verify MSW 핸들러 경로도 동일하게 맞춤. nginx.conf는 /api/ 프리픽스
매치라 별도 수정 불필요.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
실 백엔드에 GET /verify가 없어 API/MSW를 거치지 않고 verify.json을
클라이언트에서 직접 페이징하도록 변경(전체 관계망 graph.json과 동일한
패턴). mocks/verify/handlers.ts 삭제, apis/verify/queries.ts는 http.get
대신 getVerify()를 로컬에서 바로 호출.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@suwonthugger suwonthugger self-assigned this Jul 28, 2026
@suwonthugger suwonthugger linked an issue Jul 28, 2026 that may be closed by this pull request
1 task
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8c637a73-2ff1-42d2-9375-497f3540cea3

📥 Commits

Reviewing files that changed from the base of the PR and between 4b5290e and 12391ea.

📒 Files selected for processing (10)
  • src/apis/verify/queries.ts
  • src/mocks/analysis/handlers.ts
  • src/mocks/graph/handlers.ts
  • src/mocks/news/handlers.ts
  • src/mocks/verify/data.ts
  • src/mocks/verify/handlers.ts
  • src/mocks/verify/verify.json
  • src/shared/apis/http.ts
  • src/shared/mocks/handlers.ts
  • src/types/verify/index.ts

📝 Walkthrough

Walkthrough

공통 API 경로를 /api/v1로 변경하고 관련 MSW 경로를 갱신했습니다. 검증 데이터는 verify.json에서 직접 로드하며, 검증 쿼리는 로컬 getVerify 기반 클라이언트 페이징을 사용합니다.

Changes

API 경로 및 검증 목업 전환

Layer / File(s) Summary
API v1 경로 정렬
src/shared/apis/http.ts, src/mocks/{news,analysis,graph}/handlers.ts
공통 HTTP prefix와 뉴스·분석·그래프 모의 엔드포인트가 /api/v1 경로를 사용하도록 변경되었습니다.
검증 JSON 데이터 및 조회 전환
src/mocks/verify/verify.json, src/mocks/verify/data.ts, src/apis/verify/queries.ts, src/types/verify/index.ts
검증 entries와 일별 적중률을 JSON에서 로드하고, fetchVerify와 placeholder 데이터가 getVerify를 통해 클라이언트에서 페이징하도록 변경되었습니다.
검증 MSW 등록 제거
src/shared/mocks/handlers.ts
검증 MSW 핸들러 import 및 전역 등록이 제거되었습니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: feature

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/20-api-error

Comment @coderabbitai help to get the list of available commands.

@suwonthugger
suwonthugger merged commit 899dd9f into main Jul 28, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] API 연동 에러 수정

1 participant