Przeglądaj źródła

Merge branch 'feat/display-BookMarkList-including-pagination-as-component' into change-name-models-config.js

zahmis 5 lat temu
rodzic
commit
6a85867825
1 zmienionych plików z 6 dodań i 1 usunięć
  1. 6 1
      src/server/routes/apiv3/bookmarks.js

+ 6 - 1
src/server/routes/apiv3/bookmarks.js

@@ -58,7 +58,7 @@ module.exports = (crowi) => {
   const csrf = require('../../middlewares/csrf')(crowi);
   const apiV3FormValidator = require('../../middlewares/apiv3-form-validator')(crowi);
 
-  const { Page, Bookmark } = crowi.models;
+  const { Page, Bookmark, User } = crowi.models;
 
   const validator = {
     bookmarks: [
@@ -165,6 +165,11 @@ module.exports = (crowi) => {
           populate: {
             path: 'page',
             model: 'Page',
+            populate: {
+              path: 'lastUpdateUser',
+              model: 'User',
+              select: User.USER_PUBLIC_FIELDS,
+            },
           },
           page,
           limit,