From 077eed17840f286a78ec320f638978c42e0a88db Mon Sep 17 00:00:00 2001 From: Philip Jian Date: Sun, 28 Apr 2024 20:48:45 -0700 Subject: [PATCH] modify catalog query to also search host and description --- routes/catalog.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/routes/catalog.js b/routes/catalog.js index 3552435..6208087 100644 --- a/routes/catalog.js +++ b/routes/catalog.js @@ -21,7 +21,9 @@ catalogRouter.get('/', async (req, res) => { const params = []; if (title) { - query += ' AND title ILIKE $1'; + query += ' AND (title ILIKE $1'; + query += ' OR host ILIKE $1'; + query += ' OR description ILIKE $1) '; params.push(`%${title}%`); } else { params.push('');