Skip to content

Commit

Permalink
#280 [fix] 코드 리뷰 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
hyejungg committed Dec 22, 2022
1 parent ef2d413 commit 9494df5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public ResponseEntity<SuccessResponse<String>> updateRepresentBadge(@ApiIgnore @
@ApiResponse(code = 400,
message = "1. 사유를 선택 안한 경우, NO를 보내주세요. (feedbackType)\n"
+ "2. 의견은 200 글자 이내로 입력해주세요. (comment)\n"
+ "3. 의견이 없는 경우, 빈 스트링(\\\"\\\")을 보내주세요. (comment)",
+ "3. 의견이 없는 경우, 빈 스트링(\"\")을 보내주세요. (comment)",
response = ErrorResponse.class),
@ApiResponse(code = 401, message = "토큰이 만료되었습니다. 다시 로그인 해주세요.", response = ErrorResponse.class),
@ApiResponse(code = 404, message = "탈퇴했거나 존재하지 않는 유저입니다.", response = ErrorResponse.class),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static List<LayoutBlock> createUserDeleteMessage(UserDeleteResponse userD
layoutBlockList.add(section(section ->
section.text(markdownText(PROD_USER_DELETE_MESSAGE + stringBuilder.toString()))));

if (userDeleteResponse.getComment() != null) {
if (!userDeleteResponse.getComment().isBlank()) {
layoutBlockList.add(section(section ->
section.text(markdownText(PROD_NOW_USER_DELETE_COMMENT + userDeleteResponse.getComment()))));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,6 @@ public class UserDeleteResponse {
private String comment;

public static UserDeleteResponse of(long totalDeleteUserCount, List<UserDelete> users, String comment) {
if (comment.isBlank()) {
return UserDeleteResponse.builder()
.totalDeleteUserCount(totalDeleteUserCount)
.totalDeleteUserList(users.stream()
.map(user -> UserDelete.of(user.getCount(), user.getFeedbackType()))
.sorted(Comparator.comparing(userDelete -> userDelete.getFeedbackType().length()))
.collect(Collectors.toList())
)
.build();
}
return UserDeleteResponse.builder()
.totalDeleteUserCount(totalDeleteUserCount)
.totalDeleteUserList(users.stream()
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/messages/validation.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ rule.list.notNull=\uADDC\uCE59 \uB9AC\uC2A4\uD2B8\uB97C \uC785\uB825\uD574\uC8FC
rule.list.min=\uADDC\uCE59 \uB9AC\uC2A4\uD2B8\uB294 \uBE48 \uBC30\uC5F4\uC744 \uBCF4\uB0BC \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
user.feedbackType.notNull=\uC0AC\uC720\uB97C \uC120\uD0DD \uC548\uD55C \uACBD\uC6B0, NO\uB97C \uBCF4\uB0B4\uC8FC\uC138\uC694.
user.comment.max=\uC758\uACAC\uC740 200 \uAE00\uC790 \uC774\uB0B4\uB85C \uC785\uB825\uD574\uC8FC\uC138\uC694.
user.comment.notNull=\uC758\uACAC\uC774 \uC5C6\uB294 \uACBD\uC6B0, \uBE48 \uC2A4\uD2B8\uB9C1(\\"\\")\uC744 \uBCF4\uB0B4\uC8FC\uC138\uC694.
user.comment.notNull=\uC758\uACAC\uC774 \uC5C6\uB294 \uACBD\uC6B0, \uBE48 \uC2A4\uD2B8\uB9C1(\"\")\uC744 \uBCF4\uB0B4\uC8FC\uC138\uC694.

0 comments on commit 9494df5

Please sign in to comment.