Commit graph

3 commits

Author SHA1 Message Date
2f30c67b93 refactor(backend): 에러 처리 통일
- src/utils/error.js 생성: 에러 응답 유틸리티 함수들
- reply.status() → reply.code() 통일 (auth, members, stats)
- Fastify 표준 에러 응답 패턴 적용

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 13:43:26 +09:00
430bf38c91 refactor(backend): 서비스 레이어 분리
- src/services/album.js 생성: getAlbumDetails, getAlbumsWithTracks
- src/services/schedule.js 생성: getMonthlySchedules, getUpcomingSchedules
- albums/index.js, schedules/index.js에서 서비스 사용으로 변경
- schedules/index.js에서 중복 함수 제거 (240줄 감소)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 13:42:01 +09:00
b61bfe93b4 refactor(backend): 설정 통합 및 N+1 쿼리 최적화
- 카테고리 ID 상수를 config/index.js에 CATEGORY_IDS로 통합
- youtube.js, x.js, schedules/index.js에서 하드코딩된 ID를 상수로 교체
- 앨범 목록 조회 시 N+1 쿼리 문제 해결 (트랙 한 번에 조회)
- 리팩토링 작업 문서 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 13:38:25 +09:00