From 69a9b0e080fb5a28da4118b8edb10b9d61c3a2de Mon Sep 17 00:00:00 2001 From: redmt Date: Sat, 11 Jun 2022 19:34:07 +0200 Subject: [PATCH] Update inc/initRedditApi.js to pass instance_config to template --- inc/initRedditApi.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/initRedditApi.js b/inc/initRedditApi.js index 06e98aa..e96d850 100644 --- a/inc/initRedditApi.js +++ b/inc/initRedditApi.js @@ -30,7 +30,7 @@ module.exports = function(fetch) { } else { console.error(`Something went wrong while trying to get an access token from reddit API. ${result.status} – ${result.statusText}`) console.error(reddit_api_error_text) - return res.render('frontpage', { json: null, http_status_code: result.status }) + return res.render('frontpage', { json: null, http_status_code: result.status, instance_config: config }) } }).catch(error => { console.log(`Error while obtaining a reddit API key.`, error) @@ -66,7 +66,7 @@ module.exports = function(fetch) { } else { console.error(`Something went wrong while fetching data from reddit API. ${result.status} – ${result.statusText}`) console.error(reddit_api_error_text) - return res.render('frontpage', { json: null, http_status_code: result.status }) + return res.render('frontpage', { json: null, http_status_code: result.status, instance_config: config }) } }).catch(error => { console.log(`Error while refreshing the reddit API key.`, error)