diff options
Diffstat (limited to 'src/routes/index.js')
-rw-r--r-- | src/routes/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/routes/index.js b/src/routes/index.js index a743c7f..117b728 100644 --- a/src/routes/index.js +++ b/src/routes/index.js | |||
@@ -117,7 +117,7 @@ router.get("/sub-search", authenticateToken, async (req, res) => { | |||
117 | if (!req.query || !req.query.q) { | 117 | if (!req.query || !req.query.q) { |
118 | res.render("sub-search", { user: req.user }); | 118 | res.render("sub-search", { user: req.user }); |
119 | } else { | 119 | } else { |
120 | const { items, after } = await G.searchSubreddits(q); | 120 | const { items, after } = await G.searchSubreddits(req.query.q); |
121 | const subs = db | 121 | const subs = db |
122 | .query("SELECT subreddit FROM subscriptions WHERE user_id = $id") | 122 | .query("SELECT subreddit FROM subscriptions WHERE user_id = $id") |
123 | .all({ id: req.user.id }) | 123 | .all({ id: req.user.id }) |