Skip to content

Commit

Permalink
most-gans: add <title> to web endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Sep 22, 2024
1 parent 5c8bd46 commit 8c4ffe3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions most-gans/web-endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const db = new toolsdb('goodarticles_p', {
router.get('/', async function (req, res) {
if (!req.query.user) {
// Landing page
res.render('most-gans/gans-landing');
res.render('most-gans/gans-landing', { title: 'Good articles by user' });
return;
}
const {user} = req.query;
Expand All @@ -28,7 +28,8 @@ router.get('/', async function (req, res) {

res.render('most-gans/gans', {
user,
dbresult: dbresult.map(row => ({ article: row.article, date: new bot.date(row.date).format('YYYY-MM-DD') }))
dbresult: dbresult.map(row => ({ article: row.article, date: new bot.date(row.date).format('YYYY-MM-DD') })),
title: 'Good articles by ' + user,
});
});

Expand Down

0 comments on commit 8c4ffe3

Please sign in to comment.