yusuketk 6 лет назад
Родитель
Сommit
757eac574a
1 измененных файлов с 7 добавлено и 14 удалено
  1. 7 14
      src/server/models/bookmark.js

+ 7 - 14
src/server/models/bookmark.js

@@ -45,20 +45,13 @@ module.exports = function(crowi) {
     const Bookmark = this;
     const User = crowi.model('User');
 
-    // [TODO][user-profile-cache] change how to get profile image data in client side.
-    return Bookmark
-      .populate(bookmarks, {
-        path: 'page',
-        populate: {
-          path: 'lastUpdateUser', model: 'User', select: User.USER_PUBLIC_FIELDS,
-        },
-      })
-      .then((pages) => {
-        const lastUpdateUserIds = pages.map((page) => {
-          return page.user;
-        });
-        User.addImageUrlCachedsByIdList(lastUpdateUserIds);
-      });
+    // [TODO][user-profile-cache][GW-1775] change how to get profile image data in client side.
+    return Bookmark.populate(bookmarks, {
+      path: 'page',
+      populate: {
+        path: 'lastUpdateUser', model: 'User', select: User.USER_PUBLIC_FIELDS,
+      },
+    });
   };
 
   // bookmark チェック用