Просмотр исходного кода

fix: use static method in comment remove api

yukendev 2 лет назад
Родитель
Сommit
83701760d1
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      apps/app/src/server/routes/comment.js

+ 1 - 1
apps/app/src/server/routes/comment.js

@@ -475,7 +475,7 @@ module.exports = function(crowi, app) {
         throw new Error('Current user is not operatable to this comment.');
         throw new Error('Current user is not operatable to this comment.');
       }
       }
 
 
-      await comment.removeWithReplies(comment);
+      await Comment.removeWithReplies(comment);
       await Page.updateCommentCount(comment.page);
       await Page.updateCommentCount(comment.page);
       commentEvent.emit(CommentEvent.DELETE, comment);
       commentEvent.emit(CommentEvent.DELETE, comment);
     }
     }