« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/web-routes.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/web-routes.js')
-rw-r--r--src/web-routes.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/web-routes.js b/src/web-routes.js
index 619d5c62..6b1335ac 100644
--- a/src/web-routes.js
+++ b/src/web-routes.js
@@ -53,6 +53,18 @@ export async function identifyDynamicWebRoutes({
       {from: path.resolve(mediaPath), to: ['media.root']},
       {from: path.resolve(mediaCachePath), to: ['thumb.root']},
     ]),
+
+    () => {
+      if (!wikiCachePath) return [];
+
+      const from =
+        path.resolve(path.join(wikiCachePath, 'search'));
+
+      return (
+        readdir(from).then(
+          () => [{from, to: ['searchData.root']}],
+          () => []));
+    },
   ];
 
   const routeCheckPromises =