mirror of
https://codeberg.org/teddit/teddit.git
synced 2026-03-05 13:30:33 -05:00
Update home.js to pass instance_config to template
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user