Kaynağa Gözat

Merge branch 'imprv/my-bookmark-page-list-api' into imprv/bookmark-list-appearance

ryuichi-e 5 yıl önce
ebeveyn
işleme
6586235bcc
1 değiştirilmiş dosya ile 2 ekleme ve 3 silme
  1. 2 3
      src/server/routes/apiv3/bookmarks.js

+ 2 - 3
src/server/routes/apiv3/bookmarks.js

@@ -105,9 +105,8 @@ module.exports = (crowi) => {
 
   // select page from bookmark where userid = userid
 
-  router.get('/users', accessTokenParser, loginRequired, csrf, apiV3FormValidator, async(req, res) => {
-    const { userId } = req.body;
-    const { Bookmark } = crowi.models;
+  router.get('/byUser', accessTokenParser, loginRequired, csrf, apiV3FormValidator, async(req, res) => {
+    const { userId } = req.query;
     try {
       const bookmark = await Bookmark
         .find({ user: userId })