-
Notifications
You must be signed in to change notification settings - Fork 8
feat: 마이페이지 응답 요소 추가 #437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 마이페이지 응답 요소 추가 #437
Changes from all commits
ff2312f
d77308b
cd49195
00bb987
0dbd020
55bf083
5734a2f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,21 +1,30 @@ | ||||||||||||||||||||||||||||||
| package com.example.solidconnection.siteuser.service; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| import static com.example.solidconnection.common.exception.ErrorCode.CAN_NOT_CHANGE_NICKNAME_YET; | ||||||||||||||||||||||||||||||
| import static com.example.solidconnection.common.exception.ErrorCode.MENTOR_NOT_FOUND; | ||||||||||||||||||||||||||||||
| import static com.example.solidconnection.common.exception.ErrorCode.NICKNAME_ALREADY_EXISTED; | ||||||||||||||||||||||||||||||
| import static com.example.solidconnection.common.exception.ErrorCode.PASSWORD_MISMATCH; | ||||||||||||||||||||||||||||||
| import static com.example.solidconnection.common.exception.ErrorCode.UNIVERSITY_NOT_FOUND; | ||||||||||||||||||||||||||||||
| import static com.example.solidconnection.common.exception.ErrorCode.USER_NOT_FOUND; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| import com.example.solidconnection.common.exception.CustomException; | ||||||||||||||||||||||||||||||
| import com.example.solidconnection.location.country.repository.CountryRepository; | ||||||||||||||||||||||||||||||
| import com.example.solidconnection.mentor.domain.Mentor; | ||||||||||||||||||||||||||||||
| import com.example.solidconnection.mentor.repository.MentorRepository; | ||||||||||||||||||||||||||||||
| import com.example.solidconnection.s3.domain.ImgType; | ||||||||||||||||||||||||||||||
| import com.example.solidconnection.s3.dto.UploadedFileUrlResponse; | ||||||||||||||||||||||||||||||
| import com.example.solidconnection.s3.service.S3Service; | ||||||||||||||||||||||||||||||
| import com.example.solidconnection.siteuser.domain.Role; | ||||||||||||||||||||||||||||||
| import com.example.solidconnection.siteuser.domain.SiteUser; | ||||||||||||||||||||||||||||||
| import com.example.solidconnection.siteuser.dto.MyPageResponse; | ||||||||||||||||||||||||||||||
| import com.example.solidconnection.siteuser.dto.PasswordUpdateRequest; | ||||||||||||||||||||||||||||||
| import com.example.solidconnection.siteuser.repository.SiteUserRepository; | ||||||||||||||||||||||||||||||
| import com.example.solidconnection.university.domain.University; | ||||||||||||||||||||||||||||||
| import com.example.solidconnection.university.repository.LikedUnivApplyInfoRepository; | ||||||||||||||||||||||||||||||
| import com.example.solidconnection.university.repository.UniversityRepository; | ||||||||||||||||||||||||||||||
| import java.time.LocalDateTime; | ||||||||||||||||||||||||||||||
| import java.time.format.DateTimeFormatter; | ||||||||||||||||||||||||||||||
| import java.util.List; | ||||||||||||||||||||||||||||||
| import lombok.RequiredArgsConstructor; | ||||||||||||||||||||||||||||||
| import org.springframework.security.crypto.password.PasswordEncoder; | ||||||||||||||||||||||||||||||
| import org.springframework.stereotype.Service; | ||||||||||||||||||||||||||||||
|
|
@@ -32,6 +41,9 @@ public class MyPageService { | |||||||||||||||||||||||||||||
| private final PasswordEncoder passwordEncoder; | ||||||||||||||||||||||||||||||
| private final SiteUserRepository siteUserRepository; | ||||||||||||||||||||||||||||||
| private final LikedUnivApplyInfoRepository likedUnivApplyInfoRepository; | ||||||||||||||||||||||||||||||
| private final CountryRepository countryRepository; | ||||||||||||||||||||||||||||||
| private final MentorRepository mentorRepository; | ||||||||||||||||||||||||||||||
| private final UniversityRepository universityRepository; | ||||||||||||||||||||||||||||||
| private final S3Service s3Service; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| /* | ||||||||||||||||||||||||||||||
|
|
@@ -42,7 +54,19 @@ public MyPageResponse getMyPageInfo(long siteUserId) { | |||||||||||||||||||||||||||||
| SiteUser siteUser = siteUserRepository.findById(siteUserId) | ||||||||||||||||||||||||||||||
| .orElseThrow(() -> new CustomException(USER_NOT_FOUND)); | ||||||||||||||||||||||||||||||
| int likedUnivApplyInfoCount = likedUnivApplyInfoRepository.countBySiteUserId(siteUser.getId()); | ||||||||||||||||||||||||||||||
| return MyPageResponse.of(siteUser, likedUnivApplyInfoCount); | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| List<String> interestedCountries = null; | ||||||||||||||||||||||||||||||
| String universityKoreanName = null; | ||||||||||||||||||||||||||||||
| if (siteUser.getRole() == Role.MENTEE) { | ||||||||||||||||||||||||||||||
| interestedCountries = countryRepository.findKoreanNamesBySiteUserId(siteUser.getId()); | ||||||||||||||||||||||||||||||
| } else if (siteUser.getRole() == Role.MENTOR) { | ||||||||||||||||||||||||||||||
|
Comment on lines
+60
to
+62
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chain관심 국가 목록의 중복 제거와 정렬 보장 확인 필요
검증 스크립트(Repository 쿼리 확인): 🏁 Script executed: #!/bin/bash
# CountryRepository의 findKoreanNamesBySiteUserId 쿼리에 DISTINCT/ORDER BY가 있는지 확인
rg -n "findKoreanNamesBySiteUserId" -A 6 -B 3Length of output: 2196 🏁 Script executed: #!/bin/bash
set -euo pipefail
file="src/main/java/com/example/solidconnection/location/country/repository/CountryRepository.java"
echo "== FILE: $file =="
sed -n '1,240p' "$file" || trueLength of output: 1272 확인: DISTINCT는 적용되어 있으나 정렬(ORDER BY)이 없어 추가가 필요합니다
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
| Mentor mentor = mentorRepository.findBySiteUserId(siteUser.getId()) | ||||||||||||||||||||||||||||||
| .orElseThrow(() -> new CustomException(MENTOR_NOT_FOUND)); | ||||||||||||||||||||||||||||||
| University university = universityRepository.findById(mentor.getUniversityId()) | ||||||||||||||||||||||||||||||
| .orElseThrow(() -> new CustomException(UNIVERSITY_NOT_FOUND)); | ||||||||||||||||||||||||||||||
| universityKoreanName = university.getKoreanName(); | ||||||||||||||||||||||||||||||
|
Comment on lines
+63
to
+67
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 멘토의 대학 ID null 처리 누락: IllegalArgumentException 가능성 멘토는 존재하지만 mentor.getUniversityId()가 null이면 repository.findById(null) 호출로 IllegalArgumentException이 발생할 수 있습니다. 도메인 제약이 있더라도 방어 코드를 둬야 운영 안전성이 올라갑니다.
적용 diff: Mentor mentor = mentorRepository.findBySiteUserId(siteUser.getId())
.orElseThrow(() -> new CustomException(MENTOR_NOT_FOUND));
- University university = universityRepository.findById(mentor.getUniversityId())
+ Long universityId = mentor.getUniversityId();
+ if (universityId == null) {
+ throw new CustomException(UNIVERSITY_NOT_FOUND);
+ }
+ University university = universityRepository.findById(universityId)
.orElseThrow(() -> new CustomException(UNIVERSITY_NOT_FOUND));
universityKoreanName = university.getKoreanName();📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| return MyPageResponse.of(siteUser, likedUnivApplyInfoCount, interestedCountries, universityKoreanName); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| /* | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,39 @@ | ||
| package com.example.solidconnection.siteuser.service; | ||
|
|
||
| import static com.example.solidconnection.common.exception.ErrorCode.CAN_NOT_CHANGE_NICKNAME_YET; | ||
| import static com.example.solidconnection.common.exception.ErrorCode.PASSWORD_MISMATCH; | ||
| import static com.example.solidconnection.siteuser.service.MyPageService.MIN_DAYS_BETWEEN_NICKNAME_CHANGES; | ||
| import static com.example.solidconnection.siteuser.service.MyPageService.NICKNAME_LAST_CHANGE_DATE_FORMAT; | ||
| import static org.assertj.core.api.Assertions.assertThat; | ||
| import static org.assertj.core.api.Assertions.assertThatThrownBy; | ||
| import static org.assertj.core.api.AssertionsForClassTypes.assertThatCode; | ||
| import static org.junit.jupiter.api.Assertions.assertAll; | ||
| import static org.mockito.BDDMockito.any; | ||
| import static org.mockito.BDDMockito.eq; | ||
| import static org.mockito.BDDMockito.given; | ||
| import static org.mockito.BDDMockito.never; | ||
| import static org.mockito.BDDMockito.then; | ||
|
|
||
| import com.example.solidconnection.common.exception.CustomException; | ||
| import com.example.solidconnection.location.country.domain.Country; | ||
| import com.example.solidconnection.location.country.domain.InterestedCountry; | ||
| import com.example.solidconnection.location.country.fixture.CountryFixture; | ||
| import com.example.solidconnection.location.country.repository.InterestedCountryRepository; | ||
| import com.example.solidconnection.mentor.fixture.MentorFixture; | ||
| import com.example.solidconnection.s3.domain.ImgType; | ||
| import com.example.solidconnection.s3.dto.UploadedFileUrlResponse; | ||
| import com.example.solidconnection.s3.service.S3Service; | ||
| import com.example.solidconnection.siteuser.domain.AuthType; | ||
| import com.example.solidconnection.siteuser.domain.Role; | ||
| import com.example.solidconnection.siteuser.domain.SiteUser; | ||
| import com.example.solidconnection.siteuser.dto.MyPageResponse; | ||
| import com.example.solidconnection.siteuser.dto.PasswordUpdateRequest; | ||
| import com.example.solidconnection.siteuser.fixture.SiteUserFixture; | ||
| import com.example.solidconnection.siteuser.fixture.SiteUserFixtureBuilder; | ||
| import com.example.solidconnection.siteuser.repository.SiteUserRepository; | ||
| import com.example.solidconnection.support.TestContainerSpringBootTest; | ||
| import com.example.solidconnection.university.domain.LikedUnivApplyInfo; | ||
| import com.example.solidconnection.university.domain.University; | ||
| import com.example.solidconnection.university.fixture.UnivApplyInfoFixture; | ||
| import com.example.solidconnection.university.repository.LikedUnivApplyInfoRepository; | ||
| import java.time.LocalDateTime; | ||
| import org.junit.jupiter.api.Assertions; | ||
| import org.junit.jupiter.api.BeforeEach; | ||
| import org.junit.jupiter.api.DisplayName; | ||
| import org.junit.jupiter.api.Nested; | ||
|
|
@@ -56,9 +59,18 @@ class MyPageServiceTest { | |
| @Autowired | ||
| private LikedUnivApplyInfoRepository likedUnivApplyInfoRepository; | ||
|
|
||
| @Autowired | ||
| private InterestedCountryRepository interestedCountryRepository; | ||
|
|
||
| @Autowired | ||
| private SiteUserFixture siteUserFixture; | ||
|
|
||
| @Autowired | ||
| private MentorFixture mentorFixture; | ||
|
|
||
| @Autowired | ||
| private CountryFixture countryFixture; | ||
|
|
||
| @Autowired | ||
| private UnivApplyInfoFixture univApplyInfoFixture; | ||
|
|
||
|
|
@@ -76,25 +88,94 @@ void setUp() { | |
| } | ||
|
|
||
| @Test | ||
| void 마이페이지_정보를_조회한다() { | ||
| void 멘티의_마이페이지_정보를_조회한다() { | ||
| // given | ||
| int likedUnivApplyInfoCount = createLikedUnivApplyInfos(user); | ||
| Country country = countryFixture.미국(); | ||
| InterestedCountry interestedCountry = new InterestedCountry(user, country); | ||
| interestedCountryRepository.save(interestedCountry); | ||
|
|
||
| // when | ||
| MyPageResponse response = myPageService.getMyPageInfo(user.getId()); | ||
|
|
||
| // then | ||
| assertAll( | ||
| Assertions.assertAll( | ||
| () -> assertThat(response.nickname()).isEqualTo(user.getNickname()), | ||
| () -> assertThat(response.profileImageUrl()).isEqualTo(user.getProfileImageUrl()), | ||
| () -> assertThat(response.role()).isEqualTo(user.getRole()), | ||
| () -> assertThat(response.email()).isEqualTo(user.getEmail()), | ||
| // () -> assertThat(response.likedPostCount()).isEqualTo(user.getLikedPostList().size()), | ||
| // todo : 좋아요한 게시물 수 반환 기능 추가와 함께 수정요망 | ||
| () -> assertThat(response.likedUnivApplyInfoCount()).isEqualTo(likedUnivApplyInfoCount) | ||
| () -> assertThat(response.likedUnivApplyInfoCount()).isEqualTo(likedUnivApplyInfoCount), | ||
| () -> assertThat(response.interestedCountries().get(0)).isEqualTo(country.getKoreanName()), | ||
| () -> assertThat(response.attendedUniversity()).isNull() | ||
| ); | ||
| } | ||
|
|
||
| @Test | ||
| void 멘토의_마이페이지_정보를_조회한다() { | ||
| // given | ||
| SiteUser mentorUser = siteUserFixture.멘토(1, "mentor"); | ||
| University university = univApplyInfoFixture.괌대학_A_지원_정보().getUniversity(); | ||
| mentorFixture.멘토(mentorUser.getId(), university.getId()); | ||
| int likedUnivApplyInfoCount = createLikedUnivApplyInfos(mentorUser); | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| // when | ||
| MyPageResponse response = myPageService.getMyPageInfo(mentorUser.getId()); | ||
|
|
||
| // then | ||
| Assertions.assertAll( | ||
| () -> assertThat(response.nickname()).isEqualTo(mentorUser.getNickname()), | ||
| () -> assertThat(response.profileImageUrl()).isEqualTo(mentorUser.getProfileImageUrl()), | ||
| () -> assertThat(response.role()).isEqualTo(mentorUser.getRole()), | ||
| () -> assertThat(response.email()).isEqualTo(mentorUser.getEmail()), | ||
| // () -> assertThat(response.likedPostCount()).isEqualTo(user.getLikedPostList().size()), | ||
| // todo : 좋아요한 게시물 수 반환 기능 추가와 함께 수정요망 | ||
| () -> assertThat(response.likedUnivApplyInfoCount()).isEqualTo(likedUnivApplyInfoCount), | ||
| () -> assertThat(response.attendedUniversity()).isEqualTo(university.getKoreanName()), | ||
| () -> assertThat(response.interestedCountries()).isNull() | ||
| ); | ||
| } | ||
|
Comment on lines
+115
to
+138
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion 멘토 경로의 예외 시나리오 테스트 추가 제안 (커버리지 보강)
참고 테스트 스니펫(새 메서드로 추가 권장): @Test
void 멘토정보가_없으면_예외를_던진다() {
// given
SiteUser mentorUser = siteUserFixture.멘토(1, "mentorWithoutRecord");
// mentorFixture.멘토(...) 호출 생략으로 Mentor 미생성
// when & then
Assertions.assertAll(
() -> org.assertj.core.api.Assertions.assertThatThrownBy(
() -> myPageService.getMyPageInfo(mentorUser.getId()))
.isInstanceOf(CustomException.class)
.hasMessageContaining("MENTOR_NOT_FOUND")
);
}
@Test
void 멘토의_대학정보가_없으면_예외를_던진다() {
// given
SiteUser mentorUser = siteUserFixture.멘토(1, "mentorNoUniv");
// mentorFixture를 사용해 universityId를 null로 생성 가능한지 확인 필요
// (불가하면 잘못된 universityId를 주입하여 UNIVERSITY_NOT_FOUND를 유도)
// when & then
org.assertj.core.api.Assertions.assertThatThrownBy(
() -> myPageService.getMyPageInfo(mentorUser.getId()))
.isInstanceOf(CustomException.class)
.hasMessageContaining("UNIVERSITY_NOT_FOUND");
}원하시면 픽스처에 universityId null 케이스 지원을 위한 헬퍼도 추가해 드리겠습니다. 🤖 Prompt for AI Agents |
||
|
|
||
| private int createLikedUnivApplyInfos(SiteUser testUser) { | ||
| LikedUnivApplyInfo likedUnivApplyInfo1 = new LikedUnivApplyInfo(null, univApplyInfoFixture.괌대학_A_지원_정보().getId(), testUser.getId()); | ||
| LikedUnivApplyInfo likedUnivApplyInfo2 = new LikedUnivApplyInfo(null, univApplyInfoFixture.메이지대학_지원_정보().getId(), testUser.getId()); | ||
| LikedUnivApplyInfo likedUnivApplyInfo3 = new LikedUnivApplyInfo(null, univApplyInfoFixture.코펜하겐IT대학_지원_정보().getId(), testUser.getId()); | ||
|
|
||
| likedUnivApplyInfoRepository.save(likedUnivApplyInfo1); | ||
| likedUnivApplyInfoRepository.save(likedUnivApplyInfo2); | ||
| likedUnivApplyInfoRepository.save(likedUnivApplyInfo3); | ||
| return likedUnivApplyInfoRepository.countBySiteUserId(testUser.getId()); | ||
| } | ||
|
|
||
| private MockMultipartFile createValidImageFile() { | ||
| return new MockMultipartFile( | ||
| "image", | ||
| "test.jpg", | ||
| "image/jpeg", | ||
| "test image content".getBytes() | ||
| ); | ||
| } | ||
|
|
||
| private String createExpectedErrorMessage(LocalDateTime modifiedAt) { | ||
| String formatLastModifiedAt = String.format( | ||
| "(마지막 수정 시간 : %s)", | ||
| NICKNAME_LAST_CHANGE_DATE_FORMAT.format(modifiedAt) | ||
| ); | ||
| return CAN_NOT_CHANGE_NICKNAME_YET.getMessage() + " : " + formatLastModifiedAt; | ||
| } | ||
|
|
||
| private SiteUser createSiteUserWithCustomProfile() { | ||
| return siteUserFixtureBuilder.siteUser() | ||
| .email("[email protected]") | ||
| .authType(AuthType.EMAIL) | ||
| .nickname("커스텀프로필") | ||
| .profileImageUrl("profile/profileImageUrl") | ||
| .role(Role.MENTEE) | ||
| .password("customPassword123") | ||
| .create(); | ||
| } | ||
|
|
||
| @Nested | ||
| class 프로필_이미지_수정_테스트 { | ||
|
|
||
|
|
@@ -182,87 +263,4 @@ void setUp() { | |
| .hasMessage(createExpectedErrorMessage(modifiedAt)); | ||
| } | ||
| } | ||
|
|
||
| @Nested | ||
| class 비밀번호_변경_테스트 { | ||
|
|
||
| private String currentPassword; | ||
| private String newPassword; | ||
|
|
||
| @BeforeEach | ||
| void setUp() { | ||
| currentPassword = "currentPassword123"; | ||
| newPassword = "newPassword123"; | ||
|
|
||
| user.updatePassword(passwordEncoder.encode(currentPassword)); | ||
| siteUserRepository.save(user); | ||
| } | ||
|
|
||
| @Test | ||
| void 비밀번호를_성공적으로_변경한다() { | ||
| // given | ||
| PasswordUpdateRequest request = new PasswordUpdateRequest(currentPassword, newPassword, newPassword); | ||
|
|
||
| // when | ||
| myPageService.updatePassword(user.getId(), request); | ||
|
|
||
| // then | ||
| SiteUser updatedUser = siteUserRepository.findById(user.getId()).get(); | ||
| assertAll( | ||
| () -> assertThat(passwordEncoder.matches(newPassword, updatedUser.getPassword())).isTrue(), | ||
| () -> assertThat(passwordEncoder.matches(currentPassword, updatedUser.getPassword())).isFalse() | ||
| ); | ||
| } | ||
|
|
||
| @Test | ||
| void 현재_비밀번호가_일치하지_않으면_예외가_발생한다() { | ||
| // given | ||
| String wrongPassword = "wrongPassword"; | ||
| PasswordUpdateRequest request = new PasswordUpdateRequest(wrongPassword, newPassword, newPassword); | ||
|
|
||
| // when & then | ||
| assertThatThrownBy(() -> myPageService.updatePassword(user.getId(), request)) | ||
| .isInstanceOf(CustomException.class) | ||
| .hasMessage(PASSWORD_MISMATCH.getMessage()); | ||
| } | ||
| } | ||
|
|
||
| private int createLikedUnivApplyInfos(SiteUser testUser) { | ||
| LikedUnivApplyInfo likedUnivApplyInfo1 = new LikedUnivApplyInfo(null, univApplyInfoFixture.괌대학_A_지원_정보().getId(), testUser.getId()); | ||
| LikedUnivApplyInfo likedUnivApplyInfo2 = new LikedUnivApplyInfo(null, univApplyInfoFixture.메이지대학_지원_정보().getId(), testUser.getId()); | ||
| LikedUnivApplyInfo likedUnivApplyInfo3 = new LikedUnivApplyInfo(null, univApplyInfoFixture.코펜하겐IT대학_지원_정보().getId(), testUser.getId()); | ||
|
|
||
| likedUnivApplyInfoRepository.save(likedUnivApplyInfo1); | ||
| likedUnivApplyInfoRepository.save(likedUnivApplyInfo2); | ||
| likedUnivApplyInfoRepository.save(likedUnivApplyInfo3); | ||
| return likedUnivApplyInfoRepository.countBySiteUserId(testUser.getId()); | ||
| } | ||
|
|
||
| private MockMultipartFile createValidImageFile() { | ||
| return new MockMultipartFile( | ||
| "image", | ||
| "test.jpg", | ||
| "image/jpeg", | ||
| "test image content".getBytes() | ||
| ); | ||
| } | ||
|
|
||
| private String createExpectedErrorMessage(LocalDateTime modifiedAt) { | ||
| String formatLastModifiedAt = String.format( | ||
| "(마지막 수정 시간 : %s)", | ||
| NICKNAME_LAST_CHANGE_DATE_FORMAT.format(modifiedAt) | ||
| ); | ||
| return CAN_NOT_CHANGE_NICKNAME_YET.getMessage() + " : " + formatLastModifiedAt; | ||
| } | ||
|
|
||
| private SiteUser createSiteUserWithCustomProfile() { | ||
| return siteUserFixtureBuilder.siteUser() | ||
| .email("[email protected]") | ||
| .authType(AuthType.EMAIL) | ||
| .nickname("커스텀프로필") | ||
| .profileImageUrl("profile/profileImageUrl") | ||
| .role(Role.MENTEE) | ||
| .password("customPassword123") | ||
| .create(); | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List<String>를 응답하는 부분에서 고민되긴 하네요🤔ui 상으로는 그냥 국가 이름 하나만 있어서요.
게시물에서 첫번째 이미지의 썸네일만 내려주는 것처럼 하나만 내려줘야할지? 아니면 목록으로 다 내려줘야할지...
개인적인 판단으로는 지금처럼
List<String>으로 전달하여 전체를 다 보여주는게 좋을 것 같긴한데, 기획팀과 이야기가 되어야 할 것 같습니다.혹시 이와 관련된 내용이 이야기된적이 있었던가요..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 처음엔 String으로만 하려고 했으나... 디비엔 List로 들어가있어서 영서님 생각처럼 다 보여주는 게 나을 거 같다고 생각했습니다..
기획팀에 따로 이야기는 안했어서 여쭤보겠습니다!