From b7183b9b1553f2c051644af92b4dc19eea705826 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 1 May 2024 19:33:24 -0300 Subject: web-routes: make search corpuses available at /search-data --- src/web-routes.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/web-routes.js') 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 = -- cgit 1.3.0-6-gf8a5