File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments