Skip to content

Commit

Permalink
modify catalog query to also search host and description
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip-Jian committed Apr 29, 2024
1 parent 7e184a1 commit 077eed1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion routes/catalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('');
Expand Down

0 comments on commit 077eed1

Please sign in to comment.