Skip to content

feat: Admin V2 API adapter layer#32

Open
Smartnewb wants to merge 4 commits intomainfrom
feat/admin-v2-adapter
Open

feat: Admin V2 API adapter layer#32
Smartnewb wants to merge 4 commits intomainfrom
feat/admin-v2-adapter

Conversation

@Smartnewb
Copy link
Copy Markdown
Owner

Summary

  • chat.ts: /admin/chat/*/admin/v2/chat/* (rooms, messages path param, stats, CSV export)
  • messaging.ts: aiChat endpoints → /admin/v2/ai-chat/* (sessions, messages path param)
  • moderation.ts: reports endpoints → /admin/v2/reports/* (list, detail, status update)

Approach

  • 기존 함수 시그니처와 인터페이스는 모두 유지 (backward compatible)
  • 각 메서드 내부에서 v2 응답 { data } 포맷을 v1 shape로 변환하는 adapter 패턴 적용
  • // V2 ADAPTER 주석으로 변경 포인트 표시
  • userReview, profileImages, pushNotifications, momentQuestions는 v1 유지

Dependencies

  • sometimes-api PR #207 (Admin V2 API) 머지 필요

Remaining work (별도 PR)

  • dashboard.ts: v2 consolidated endpoint 전환 (UI 컴포넌트 변경 필요)
  • moderation.ts userReview: 백엔드 스키마 버그 수정 후 연결
  • users.ts: 하이브리드 전환 (조회 v2, 운영 액션 v1 유지)

Test plan

  • sometimes-api v2 엔드포인트 로컬 동작 확인
  • 채팅방 목록/메시지 조회 정상 동작
  • AI 채팅 세션/메시지 조회 정상 동작
  • 신고 목록/상세/상태변경 정상 동작
  • CSV 내보내기 정상 동작

🤖 Generated with Claude Code

- chat.ts: /admin/chat/* → /admin/v2/chat/* with response adapters
- messaging.ts: aiChat endpoints → /admin/v2/ai-chat/* with path params
- moderation.ts: reports endpoints → /admin/v2/reports/* with adapter

All function signatures and interfaces unchanged for backward
compatibility. V2 response shape ({ data }) unwrapped and mapped
to existing UI-expected shapes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
project-solo Ready Ready Preview, Comment Mar 15, 2026 8:01am

Request Review

- dashboard.ts: add dashboardV2 export (summary, revenue, signups,
  stats overview, retention) alongside existing v1 stats
- moderation.ts: userReview endpoints → /admin/v2/profile-review/*
- users.ts: hybrid v1/v2 (list/detail/rank → v2, operations → v1)
- ai-chat-v2.tsx: fix sessionsData.sessions → items, session lookup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

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.

1 participant