Skip to content

댓글 (Comment) #7

Description

@ParkJiwoon

Post 스펙과 동일하게 회원용과 비회원용을 나눠서 제공

댓글은 수정 기능이 없음

API

조회

  • GET /api/v1/posts/{postId}/comments?lastCommentId={}: 특정 게시글의 댓글 리스트 조회
    • lastCommentId (optional) (쿼리 파라미터 없이 요청하면 오래된 순으로 내려줌)
    • 댓글 리스트 내려주기
    • 기존 디씨앱의 댓글은 무한스크롤이 아니라 페이징 방식이지만 여기서는 무한 스크롤 방식을 사용
    • 게시글 (Post) 와 다르게 댓글은 오래된 데이터부터 내려줌

회원용

  • POST /api/v1/posts/{postId}/comments: 특정 게시글의에 댓글 작성
    • Body 에 baseCommentId 를 넣으면 특정 댓글에 다는 댓글이 됨
  • DELETE /api/v1/comments/{commentId}: 특정 게시글의 댓글 삭제

비회원용

  • POST /api/v1/posts/{postId}/comments/non-member: 특정 게시글의 댓글 작성
    • Body 에 baseCommentId 를 넣으면 특정 댓글에 다는 댓글이 됨
  • DELETE /api/v1/comments/non-member/{commentId}: 특정 게시글의 댓글 삭제
  • PUT /api/v1/comments/non-member/access: 특정 댓글을 수정/삭제하기 전에 비밀번호 확인

Response

공통 스펙

  • commentId: 댓글 id
  • content: 댓글 내용
  • createdAt: 작성일
  • updatedAt: 수정일 (아마 필요없을거같은데 임시로)
  • replies: 해당 댓글에 달려있는 답글들
  • memberInfo: 게시글 작성자 정보

MemberInfo

  • 비회원인 경우
    • nickname (ip 포함): 닉네임
  • 회원인 경우
    • nickname: 닉네임
    • username: 댓글 작성자의 unique username

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions