Skip to content

Commit

Permalink
modify catalog query to also search host and description (#69)
Browse files Browse the repository at this point in the history
Co-authored-by: michellelin1 <[email protected]>
  • Loading branch information
Philip-Jian and michellelin1 authored Apr 30, 2024
1 parent 3b645a8 commit 05553e7
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 05553e7

Please sign in to comment.