Explorar o código

fix: use static method in comment remove api

yukendev %!s(int64=2) %!d(string=hai) anos
pai
achega
83701760d1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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.');
       }
 
-      await comment.removeWithReplies(comment);
+      await Comment.removeWithReplies(comment);
       await Page.updateCommentCount(comment.page);
       commentEvent.emit(CommentEvent.DELETE, comment);
     }