فهرست منبع

Revert "Fix RecentCreated"

This reverts commit df380afb4f64a93bc86f4a7e8d1d5795891f2d6c.
Seiya Tashiro 7 سال پیش
والد
کامیت
4e117bb033
2فایلهای تغییر یافته به همراه1 افزوده شده و 15 حذف شده
  1. 0 13
      src/client/js/components/RecentCreated/RecentCreated.js
  2. 1 2
      src/server/routes/admin.js

+ 0 - 13
src/client/js/components/RecentCreated/RecentCreated.js

@@ -20,21 +20,8 @@ export default class RecentCreated extends React.Component {
 
 
   componentWillMount() {
-    this.getRecentCreatedLimit();
     this.getRecentCreatedList(1);
   }
-  getRecentCreatedLimit() {
-    this.props.crowi.apiGet('/pages.recentCreated.limit', {})
-      .then(res => {
-        let limit = res.pages.showRecentCreatedNumber;
-        if (!limit) {
-          limit = 10;
-        }
-        this.setState({
-          limit,
-        });
-      });
-  }
   getRecentCreatedList(selectPageNumber) {
 
     const pageId = this.props.pageId;

+ 1 - 2
src/server/routes/admin.js

@@ -1387,10 +1387,9 @@ module.exports = function(crowi, app) {
   /**
    * Get Config.showRecentCreatedNumber and response result with json
    *
-   * @param {*} req
    * @param {*} res
    */
-  actions.api.showRecentCreatedNumber = function(req, res) {
+  actions.api.showRecentCreatedNumber = async(res) => {
     const config = crowi.getConfig();
 
     try {