코드 정리
This commit is contained in:
@@ -6,5 +6,4 @@ import myblog.blog.shared.domain.BadRequestException;
|
||||
- REST 컨트롤러 상태 메세지 전송용 커스텀 에러
|
||||
*/
|
||||
public class CommentBadRequestException extends BadRequestException {
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,6 @@ public class CommentService implements CommentUseCase {
|
||||
.parents(pComment)
|
||||
.secret(secret)
|
||||
.build();
|
||||
|
||||
commentRepositoryPort.save(comment);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user