Procházet zdrojové kódy

Fixed code to use req.user

Taichi Masuyama před 4 roky
rodič
revize
c24d586357
1 změnil soubory, kde provedl 1 přidání a 3 odebrání
  1. 1 3
      packages/app/src/server/routes/apiv3/pages.js

+ 1 - 3
packages/app/src/server/routes/apiv3/pages.js

@@ -791,9 +791,7 @@ module.exports = (crowi) => {
     if (convertPath != null) {
       const normalizedPath = pathUtils.normalizePath(convertPath);
       try {
-        // await crowi.pageService.normalizeParentByPath(normalizedPath, req.user);
-        const User = mongoose.model('User');
-        await crowi.pageService.normalizeParentByPath(normalizedPath, await User.findOne());
+        await crowi.pageService.normalizeParentByPath(normalizedPath, req.user);
       }
       catch (err) {
         logger.error(err);