فهرست منبع

WIP: refactor Page model finder functions

Yuki Takei 7 سال پیش
والد
کامیت
e15d06fa7e
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/server/models/page.js

+ 2 - 2
src/server/models/page.js

@@ -460,9 +460,9 @@ module.exports = function(crowi) {
     const page = await this.findOne({_id: id});
     const page = await this.findOne({_id: id});
     if (page == null) {
     if (page == null) {
       throw new Error('Page not found');
       throw new Error('Page not found');
-        }
+    }
 
 
-    return Page.populatePageData(page, null);
+    return this.populatePageData(page, null);
   };
   };
 
 
   pageSchema.statics.findPageByIdAndGrantedUser = function(id, userData) {
   pageSchema.statics.findPageByIdAndGrantedUser = function(id, userData) {