We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 201f359 + fdd5d73 commit 75ec343Copy full SHA for 75ec343
src/main/java/com/example/RealMatch/user/presentation/dto/response/MyProfileCardResponseDto.java
@@ -39,9 +39,17 @@ public static MyProfileCardResponseDto from(
39
user.getProfileImageUrl(),
40
user.getGender() != null ? user.getGender().name() : "",
41
age,
42
- detail != null ? detail.getSnsUrl() : "",
+ detail != null ? extractInstagramAccount(detail.getSnsUrl()) : "",
43
categoryNames,
44
detail != null ? MyMatchingResultResponseDto.from(detail) : null
45
);
46
}
47
+
48
+ private static String extractInstagramAccount(String snsUrl) {
49
+ if (snsUrl == null || snsUrl.isBlank()) {
50
+ return "";
51
+ }
52
+ return snsUrl.replace("https://www.instagram.com/", "")
53
+ .replace("/", "");
54
55
0 commit comments