Skip to content

Commit

Permalink
[MODIFY] 메인 문구 반환시 html bold 태그로 닉네임 감싸서 반환하도록 변경 (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
kseysh authored Nov 21, 2024
2 parents 1ed0b55 + 6991a57 commit e28db1f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/main/java/org/sopt/app/common/utils/HtmlTagWrapper.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.sopt.app.common.utils;

import lombok.NoArgsConstructor;

@NoArgsConstructor(access = lombok.AccessLevel.PRIVATE)
public class HtmlTagWrapper {
public static String wrapWithTag(String content, String tag) {
return "<" + tag + ">" + content + "</" + tag + ">";
}
}
4 changes: 3 additions & 1 deletion src/main/java/org/sopt/app/facade/HomeFacade.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.sopt.app.facade;

import static org.sopt.app.common.utils.HtmlTagWrapper.wrapWithTag;

import java.util.List;
import lombok.RequiredArgsConstructor;
import lombok.val;
Expand Down Expand Up @@ -41,7 +43,7 @@ public HomeDescriptionResponse getHomeMainDescription(User user) {
.getAllGenerations();
ActivityDurationCalculator calculator = ActivityDurationCalculator.of(ownGenerations);
return HomeDescriptionResponse.of(
user.getUsername(),
wrapWithTag(user.getUsername(), "b"),
calculator.getActivityDuration()
);
}
Expand Down

0 comments on commit e28db1f

Please sign in to comment.