Skip to content

Comments

Feature/회원이 스크랩한 공고 조회 API#80

Open
jungchanSon wants to merge 1 commit intodevfrom
29-feat-스크랩한-공고-목록-조회-api

Hidden character warning

The head ref may contain hidden characters: "29-feat-\uc2a4\ud06c\ub7a9\ud55c-\uacf5\uace0-\ubaa9\ub85d-\uc870\ud68c-api"
Open

Feature/회원이 스크랩한 공고 조회 API#80
jungchanSon wants to merge 1 commit intodevfrom
29-feat-스크랩한-공고-목록-조회-api

Conversation

@jungchanSon
Copy link
Member

📍 PR 타입 (하나 이상 선택)

  • [O] 기능 추가
  • 버그 수정
  • 의존성, 환경 변수, 빌드 관련 코드 업데이트
  • 기타 사소한 수정

❗️ 관련 이슈 [#]

#29

📄 개요

  • 회원이 스크랩한 공고 조회 API 개발

🔁 변경 사항

변경 내용을 적어주세요 (커밋 번호를 적어주세요)

  • 왜, 어떻게 변경했는지 상세한 설명을 작성해주세요 (생략 가능)

📸 스크린샷

👀 기타 더 이야기해볼 점

@jungchanSon jungchanSon added the ✨ feat 기능 개발 label Jan 9, 2025
@jungchanSon jungchanSon added this to the 🧑회원 API 개발 milestone Jan 9, 2025
@jungchanSon jungchanSon self-assigned this Jan 9, 2025
@jungchanSon jungchanSon linked an issue Jan 9, 2025 that may be closed by this pull request
1 task
@GuKBABjOa
Copy link

정찬님, 수고하셨습니다

@GuKBABjOa
Copy link

image
저는 이렇게 받아서 스크랩이 되었냐 안되었냐로 필터링해서 테이블로 보여줬는데 코드를 보니 스크랩한 공고들을 따로 테이블에 저장하나 보군요 그럼 나중에 수정할때 스크랩유무를 판단할 필요없이 단순하게 가져온 리스트를 처리하면 되겠네요.

private final MyJobNoticeService myJobNoticeService;

@GetMapping("/mypage/job-notice/{memberId}")
public ResponseEntity<ApiResponse<ReadScrappedJobNoticeDto.ResponseDto>> readScrappedJobNotice(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

지금 이부분을 읽어보면 페이지네이션에 관련된 내용같은데 원래 백엔드에서 페이지의 크기같은걸 정해주는건가요? 제가 코드를 이해를 못한건지 원리를 이해를 못한건지 모르겠습니다. 이 코드에 대한 설명 부탁드립니다.
이왕이면 프론트에서 무슨데이터를 받아서 백엔드에서 어떤식으로 처리를 해서 어떤 데이터를 프론트로 보낸다. 라는 식으로 흐름을 설명해주시면 이해하는데 도움이 될 것 같습니다. 감사합니다

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제가 생각했던 방법은

  1. 백엔드에 스크랩한 공고를 달라고한다.
  2. 백엔드에서 공고리스트가 날라온다
  3. 총개수와 한페이지에 보여줄 개수를 정해서 (내가정함) 페이지 수를 계산한다
  4. 화면에 뿌린다.
    이런식인데 백엔드에서 페이지를 정해준다면 방식을 바꿔야 할 것 같습니다.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

안녕하세요 성일님 반갑습니다.
해당 api의 경우, 페이지 넘버와 페이지당 데이터 개수는 프론트엔드에서 지정해 줄 수 있습니다. 만약 지정을 해주지 않을 경우, 가장 첫 페이지의 10개의 데이터만을 응답하게 됩니다.

예를들어,

GET ...?page=2&limit=100

와 같이 요청을 보낼 경우 2페이지의 100개의 데이터를 응답하며, 위 쿼리 파라미터를 생략해줄 경우 첫페이지의 10개의 데이터를 응답합니다.

페이지의 경우 0부터 시작하며, 0페이지가 첫번째 페이지 인점 주의해주시기 바랍니다.

감사합니다.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이해했습니다. 감사합니다!

Copy link

@ghrbs0437 ghrbs0437 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Labels

✨ feat 기능 개발

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ feat: 스크랩한 공고 목록 조회 API

3 participants