Procházet zdrojové kódy

fix: browse tree ancestors not converted in mariadb

NGPixel před 5 roky
rodič
revize
7c59bfed08
2 změnil soubory, kde provedl 4 přidání a 2 odebrání
  1. 1 1
      server/graph/resolvers/page.js
  2. 3 1
      server/setup.js

+ 1 - 1
server/graph/resolvers/page.js

@@ -227,7 +227,7 @@ module.exports = {
         } else {
           builder.where('parent', args.parent)
           if (args.includeAncestors && curPage && curPage.ancestors.length > 0) {
-            builder.orWhereIn('id', curPage.ancestors)
+            builder.orWhereIn('id', _.isString(curPage.ancestors) ? JSON.parse(curPage.ancestors) : curPage.ancestors)
           }
         }
       }).orderBy([{ column: 'isFolder', order: 'desc' }, 'title'])

+ 3 - 1
server/setup.js

@@ -323,7 +323,9 @@ module.exports = () => {
                 kind: 'link',
                 label: 'Home',
                 target: '/',
-                targetType: 'home'
+                targetType: 'home',
+                visibilityMode: 'all',
+                visibilityGroups: null
               }
             ]
           }