Update inc/initRedditApi.js to pass instance_config to template
This commit is contained in:
parent
afbad4ae3b
commit
69a9b0e080
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue