Explorar o código

WIP: refactor Page model finder functions

Yuki Takei %!s(int64=7) %!d(string=hai) anos
pai
achega
e15d06fa7e
Modificáronse 1 ficheiros con 2 adicións e 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) {