코드 정리

This commit is contained in:
jinia91
2022-04-25 21:56:07 +09:00
parent ea604f4c5c
commit 351fa14579
4 changed files with 1 additions and 5 deletions

View File

@@ -6,5 +6,4 @@ import myblog.blog.shared.domain.BadRequestException;
- REST 컨트롤러 상태 메세지 전송용 커스텀 에러
*/
public class CommentBadRequestException extends BadRequestException {
}

View File

@@ -40,7 +40,6 @@ public class CommentController {
if (errors.hasErrors()) {
throw new CommentBadRequestException();
}
MemberVo member = principal.getMember();
// 부모 댓글인지 자식댓글인지 분기로 저장
if(parentId != null){
@@ -49,7 +48,6 @@ public class CommentController {
else {
commentUseCase.savePComment(commentForm.getContent(), commentForm.isSecret(), member.getId(), articleId);
}
return commentQueriesUseCase.getCommentList(articleId);
}

View File

@@ -63,7 +63,6 @@ public class CommentService implements CommentUseCase {
.parents(pComment)
.secret(secret)
.build();
commentRepositoryPort.save(comment);
}

View File

@@ -74,7 +74,7 @@ public class Comment extends BasicEntity {
*/
private String removeDuplicatedEnter(String content) {
if(content == null || content.isEmpty()){
throw new CommentBadRequestException ();
throw new CommentBadRequestException();
}
char[] contentBox = new char[content.length()];
int idx = 0;