[♻️ refactor] 홈 > 곧 마감되는 관심공고 : 분기 처리를 위한 데이터 형식 추가 #138
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.
📄 Work Description
스크랩된 공고 X, 곧 마감 공고 X -> "아직 스크랩된 인턴 공고가 없어요!"
스크랩된 공고 O, 곧 마감 공고 X -> "공고 마감 일정 확인하기"
스크랩된 공고 O, 곧 마감 공고 O -> 공고 정보 보여주기
현재는 이렇게 구성되어 있으나, 분기처리를 위해 유저가 스크랩한 공고가 있는지를 알아야 하는데 곧 마감 공고 API에서는 알 수가 없는 문제가 있습니다.
곧 마감 공고 API에 유저가 스크랩한 공고가 있는지 여부(hasScrapped)를 response에 추가하여
스크랩을 했으나 곧 마감되는 공고가 없는 것인지와
스크랩한 공고가 아예없는 것인지 각각에 대한 분기처리를 명확히 구분했습니다!
⚙️ ISSUE
📷 Screenshot
스크랩된 공고 X, 곧 마감 공고 X -> "아직 스크랩된 인턴 공고가 없어요!" (hasScrapped = false)
스크랩된 공고 O, 곧 마감 공고 X -> "일주일 내에 마감인 공고가 없어요\n캘린더에서 스크랩한 공고 일정을 확인해 보세요" (hasScrapped = true)
스크랩된 공고 O, 곧 마감 공고 O -> "곧 마감인 인턴 공고 요청을 성공했습니다" (hasScrapped = true)
💬 To Reviewers
🔗 Reference