From 8f57cb143bb1a6e4a6deca5355821381a8f0b5dc Mon Sep 17 00:00:00 2001 From: redmt Date: Sat, 11 Jun 2022 19:34:22 +0200 Subject: [PATCH] Update home.js to pass instance_config to template --- routes/home.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/routes/home.js b/routes/home.js index 81c3ef6..406e2da 100644 --- a/routes/home.js +++ b/routes/home.js @@ -139,6 +139,7 @@ homeRoute.get([`/:sort?`, '/frontpage'], async (req, res, next) => { return res.render('frontpage', { json: null, user_preferences: req.cookies, + instance_config: config, }); } if (json) { @@ -168,6 +169,7 @@ homeRoute.get([`/:sort?`, '/frontpage'], async (req, res, next) => { past: past, user_preferences: req.cookies, redis_key: key, + instance_config: config, }); } })(); @@ -201,6 +203,7 @@ homeRoute.get([`/:sort?`, '/frontpage'], async (req, res, next) => { return res.render('frontpage', { json: null, user_preferences: req.cookies, + instance_config: config, }); } else { console.log('Fetched the frontpage from Reddit.'); @@ -229,6 +232,7 @@ homeRoute.get([`/:sort?`, '/frontpage'], async (req, res, next) => { past: past, user_preferences: req.cookies, redis_key: key, + instance_config: config, }); } })(); @@ -245,6 +249,7 @@ homeRoute.get([`/:sort?`, '/frontpage'], async (req, res, next) => { json: null, http_status_code: result.status, user_preferences: req.cookies, + instance_config: config, }); } })