mirror of
https://github.com/QuiteAFancyEmerald/Holy-Unblocker.git
synced 2025-05-15 21:00:00 -04:00
Slight change to path logic.
This commit is contained in:
parent
22f404793a
commit
e2fd72b8ba
1 changed files with 3 additions and 3 deletions
|
@ -94,9 +94,9 @@ app.use(helmet({
|
|||
// Query strings like /?j are converted into paths like /views/hidden.html
|
||||
// back here. Which query string converts to what is defined in routes.mjs.
|
||||
router.get('/', async (req, res) => res.send(paintSource(loadTemplates(tryReadFile(
|
||||
// Return the index page if the query is not found.
|
||||
// Also sets it as the default page.
|
||||
path.join(__dirname, 'views', pages[Object.keys(req.query)[0] || 'index'] || pages.index)
|
||||
// Return the index page if the query is not found, as there is no
|
||||
// undefined page in routes.mjs. Also sets it as the default page.
|
||||
path.join(__dirname, 'views', pages[Object.keys(req.query)[0]] || pages.index)
|
||||
)))));
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue