File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ export class CommentService {
3838 if ( userInformation . id !== commentObj . user . id ) {
3939 throw new UnauthorizedException ( '본인이 작성한 댓글이 아닙니다.' ) ;
4040 }
41+
42+ return commentObj ;
4143 }
4244
4345 async get ( commentDto : GetCommentRequestDto ) {
@@ -68,11 +70,10 @@ export class CommentService {
6870 }
6971
7072 async update ( userInformation : Payload , commentDto : UpdateCommentRequestDto ) {
71- await this . commentCheck ( userInformation , commentDto . commentId ) ;
72- const commentObj = await this . commentRepository . findOneBy ( {
73- id : commentDto . commentId ,
74- } ) ;
75-
73+ const commentObj = await this . commentCheck (
74+ userInformation ,
75+ commentDto . commentId ,
76+ ) ;
7677 commentObj . comment = commentDto . newComment ;
7778 await this . commentRepository . save ( commentObj ) ;
7879 }
You can’t perform that action at this time.
0 commit comments