From 5de14f99c9e9b0d20e8768b1373e172af595c648 Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 31 Oct 2024 14:41:31 +0000 Subject: improve mobile ui, add pagination --- src/routes/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/routes/index.js') diff --git a/src/routes/index.js b/src/routes/index.js index 867a223..5f43764 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -17,11 +17,12 @@ router.get('/r/:subreddit/:sort?', async (req, res) => { var sort = req.params.sort ? req.params.sort : 'hot'; var options = req.query; - // var postsReq = G.getSubmissions(sort, `r/${subreddit}`, options); var postsReq = G.getSubmissions(sort, `${subreddit}`, options); var aboutReq = G.getSubreddit(`${subreddit}`); var [posts, about] = await Promise.all([postsReq, aboutReq]); + console.log(`posts for ${subreddit}`); + console.log(posts.posts.length); res.render('index', { subreddit, posts, about }); }); -- cgit v1.2.3