Skip to content

Commit 136a2df

Browse files
committed
♻️ refactor: commentCheck 메서드명을 getValidatedComment로 수정
1 parent 419339e commit 136a2df

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ export class CommentService {
2323
private readonly dataSource: DataSource,
2424
) {}
2525

26-
private async commentCheck(userInformation: Payload, commentId: number) {
26+
private async getValidatedComment(
27+
userInformation: Payload,
28+
commentId: number,
29+
) {
2730
const commentObj = await this.commentRepository.findOne({
2831
where: {
2932
id: commentId,
@@ -105,7 +108,7 @@ export class CommentService {
105108
}
106109

107110
async delete(userInformation: Payload, commentDto: DeleteCommentRequestDto) {
108-
const comment = await this.commentCheck(
111+
const comment = await this.getValidatedComment(
109112
userInformation,
110113
commentDto.commentId,
111114
);
@@ -130,7 +133,7 @@ export class CommentService {
130133
}
131134

132135
async update(userInformation: Payload, commentDto: UpdateCommentRequestDto) {
133-
const commentObj = await this.commentCheck(
136+
const commentObj = await this.getValidatedComment(
134137
userInformation,
135138
commentDto.commentId,
136139
);

0 commit comments

Comments
 (0)