Bläddra i källkod

WIP: refactor Page model finder functions

Yuki Takei 7 år sedan
förälder
incheckning
e15d06fa7e
1 ändrade filer med 2 tillägg och 2 borttagningar
  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});
     if (page == null) {
       throw new Error('Page not found');
-        }
+    }
 
-    return Page.populatePageData(page, null);
+    return this.populatePageData(page, null);
   };
 
   pageSchema.statics.findPageByIdAndGrantedUser = function(id, userData) {