Skip to content

[Refactor] feed api코드 리펙토링 - #62

Merged
jae-2024 merged 1 commit into
mainfrom
Refactor/#61/feed-cursor-response
Feb 23, 2026
Merged

jae-2024 merged 1 commit into
mainfrom
Refactor/#61/feed-cursor-response

Conversation

@jae-2024

Copy link
Copy Markdown
Contributor

목적

  • GET /api/feeds 응답 구조를 List → FeedCursorResponse로 변경

세부 설명

  • 프론트가 마지막 요소를 직접 꺼내 커서로 사용해야 함
  • hasNext 여부를 프론트에서 판단하기 어려움
  • 타입 자동 추론(OpenAPI / TypeScript) 시 확장성이 떨어짐

변경하지 않아도 된 이유

  • 프론트에서 마지막 요소의 feedId, createdAt을 직접 커서로 사용 가능()
  • 단순 리스트 조회만 필요하다면 배열 응답도 충분
  • 소규모 서비스에서는 큰 문제 없음

-> 기능적 오류는 없으나 확장성, 타입 안정성, 커서 기반 표준 구조 측면에서 객체 래핑 방식이 더 적합하다고 판단하여 변경하였습니다.

@jae-2024 jae-2024 self-assigned this Feb 23, 2026
@jae-2024 jae-2024 added the 🔨Refactor 코드 리팩토링 label Feb 23, 2026
@jae-2024
jae-2024 merged commit 2d4d732 into main Feb 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨Refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor] Feed 목록 조회 API를 커서 기반 표준 응답 구조로 변경

1 participant