소스 검색

delete countLikers method

takeru0001 5 년 전
부모
커밋
8390be3786
1개의 변경된 파일0개의 추가작업 그리고 8개의 파일을 삭제
  1. 0 8
      src/server/models/page.js

+ 0 - 8
src/server/models/page.js

@@ -389,14 +389,6 @@ module.exports = function(crowi) {
     }));
   };
 
-  pageSchema.statics.countLikers = async function(pageId) {
-    const result = this.aggregate()
-      .match({ page: { $in: pageId } })
-      .group({ _id: '$page', count: { $sum: 1 } });
-
-    return result;
-  };
-
   pageSchema.methods.isSeenUser = function(userData) {
     return this.seenUsers.includes(userData._id);
   };