Explorar el Código

fix: use static method in comment remove api

yukendev hace 2 años
padre
commit
83701760d1
Se han modificado 1 ficheros con 1 adiciones y 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);
     }