|
|
@@ -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 チェック用
|