瀏覽代碼

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) {
   pageSchema.methods.isSeenUser = function(userData) {
     return this.seenUsers.includes(userData._id);
     return this.seenUsers.includes(userData._id);
   };
   };