Skip to content

Commit 419339e

Browse files
committed
⚡️ perf: 중복된 comment 조회 로직 삭제
1 parent 73917e7 commit 419339e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server/src/comment/service/comment.service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ export class CommentService {
130130
}
131131

132132
async update(userInformation: Payload, commentDto: UpdateCommentRequestDto) {
133-
await this.commentCheck(userInformation, commentDto.commentId);
134-
const commentObj = await this.commentRepository.findOneBy({
135-
id: commentDto.commentId,
136-
});
133+
const commentObj = await this.commentCheck(
134+
userInformation,
135+
commentDto.commentId,
136+
);
137137

138138
commentObj.comment = commentDto.newComment;
139139
await this.commentRepository.save(commentObj);

0 commit comments

Comments
 (0)