Feature/회원이 스크랩한 공고 조회 API#80
Open
jungchanSon wants to merge 1 commit intodevfrom
Hidden character warning
The head ref may contain hidden characters: "29-feat-\uc2a4\ud06c\ub7a9\ud55c-\uacf5\uace0-\ubaa9\ub85d-\uc870\ud68c-api"
Open
Conversation
1 task
|
정찬님, 수고하셨습니다 |
GuKBABjOa
reviewed
Jan 9, 2025
| private final MyJobNoticeService myJobNoticeService; | ||
|
|
||
| @GetMapping("/mypage/job-notice/{memberId}") | ||
| public ResponseEntity<ApiResponse<ReadScrappedJobNoticeDto.ResponseDto>> readScrappedJobNotice( |
There was a problem hiding this comment.
지금 이부분을 읽어보면 페이지네이션에 관련된 내용같은데 원래 백엔드에서 페이지의 크기같은걸 정해주는건가요? 제가 코드를 이해를 못한건지 원리를 이해를 못한건지 모르겠습니다. 이 코드에 대한 설명 부탁드립니다.
이왕이면 프론트에서 무슨데이터를 받아서 백엔드에서 어떤식으로 처리를 해서 어떤 데이터를 프론트로 보낸다. 라는 식으로 흐름을 설명해주시면 이해하는데 도움이 될 것 같습니다. 감사합니다
There was a problem hiding this comment.
제가 생각했던 방법은
- 백엔드에 스크랩한 공고를 달라고한다.
- 백엔드에서 공고리스트가 날라온다
- 총개수와 한페이지에 보여줄 개수를 정해서 (내가정함) 페이지 수를 계산한다
- 화면에 뿌린다.
이런식인데 백엔드에서 페이지를 정해준다면 방식을 바꿔야 할 것 같습니다.
Member
Author
There was a problem hiding this comment.
안녕하세요 성일님 반갑습니다.
해당 api의 경우, 페이지 넘버와 페이지당 데이터 개수는 프론트엔드에서 지정해 줄 수 있습니다. 만약 지정을 해주지 않을 경우, 가장 첫 페이지의 10개의 데이터만을 응답하게 됩니다.
예를들어,
GET ...?page=2&limit=100
와 같이 요청을 보낼 경우 2페이지의 100개의 데이터를 응답하며, 위 쿼리 파라미터를 생략해줄 경우 첫페이지의 10개의 데이터를 응답합니다.
페이지의 경우 0부터 시작하며, 0페이지가 첫번째 페이지 인점 주의해주시기 바랍니다.
감사합니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

📍 PR 타입 (하나 이상 선택)
❗️ 관련 이슈 [#]
#29
📄 개요
🔁 변경 사항
변경 내용을 적어주세요 (커밋 번호를 적어주세요)
📸 스크린샷
👀 기타 더 이야기해볼 점