Explorar el Código

WIP: refactor Page model finder functions

Yuki Takei hace 7 años
padre
commit
e15d06fa7e
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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) {