From d1def4a6ad4f5047835a955c0de25740acd9cf71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A3=BC=EC=96=B4=EC=A7=84=EC=82=AC=EB=9E=91=28eojinjoo?= =?UTF-8?q?=29?= Date: Tue, 23 May 2023 00:28:28 +0900 Subject: [PATCH] fix: profileImage null error --- build.gradle | 4 ++-- .../org/sopt/app/application/auth/PlaygroundAuthService.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index bc8c7242..ca86c456 100644 --- a/build.gradle +++ b/build.gradle @@ -49,8 +49,8 @@ dependencies { // jwt implementation 'io.jsonwebtoken:jjwt-api:0.11.5' - runtimeOnly group: 'io.jsonwebtoken', name: 'jjwt-impl', version: '0.11.2' - runtimeOnly group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: '0.11.2' + runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5' + runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5' // DB implementation 'org.springframework.boot:spring-boot-starter-data-jpa' diff --git a/src/main/java/org/sopt/app/application/auth/PlaygroundAuthService.java b/src/main/java/org/sopt/app/application/auth/PlaygroundAuthService.java index c585c6bb..c64e43ef 100644 --- a/src/main/java/org/sopt/app/application/auth/PlaygroundAuthService.java +++ b/src/main/java/org/sopt/app/application/auth/PlaygroundAuthService.java @@ -110,13 +110,14 @@ public PlaygroundAuthInfo.RefreshedToken refreshPlaygroundToken(AuthRequest.Acce public PlaygroundAuthInfo.MainView getPlaygroundUserForMainView(String accessToken) { val playgroundProfile = this.getPlaygroundMemberProfile(accessToken); + val profileImage = playgroundProfile.getProfileImage() == null ? "" : playgroundProfile.getProfileImage(); val generationList = playgroundProfile.getActivities().stream() .map(activity -> activity.getCardinalActivities().get(0).getGeneration()).collect(Collectors.toList()); Collections.sort(generationList, Collections.reverseOrder()); val mainViewUser = PlaygroundAuthInfo.MainViewUser.builder() .status(this.getStatus(generationList)) .name(playgroundProfile.getName()) - .profileImage(playgroundProfile.getProfileImage()) + .profileImage(profileImage) .generationList(generationList) .build(); return PlaygroundAuthInfo.MainView.builder().user(mainViewUser).build();