فهرست منبع

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);
   };