Skip to content

Commit

Permalink
Feat: 카카오 친구목록 권한 없을 경우 에러처리
Browse files Browse the repository at this point in the history
  • Loading branch information
hjinshin committed Nov 14, 2024
1 parent 81d4ac4 commit d6aeec0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package supernova.whokie.friend.service;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import lombok.RequiredArgsConstructor;
Expand Down Expand Up @@ -32,6 +33,9 @@ public List<FriendModel.Info> getKakaoFriends(Long userId) {
String accessToken = kakaoTokenService.refreshIfAccessTokenExpired(userId);
List<KakaoDto.Profile> profiles = apiCaller.getKakaoFriends(accessToken).elements();
System.out.println(profiles);
if (profiles == null) {
return new ArrayList<>();
}
List<Long> kakaoId = profiles.stream().map(KakaoDto.Profile::id).toList();
List<Users> friendUsers = userReaderService.getUserListByKakaoIdIn(kakaoId);

Expand Down

0 comments on commit d6aeec0

Please sign in to comment.