Skip to content

Commit db91a3a

Browse files
Liam Andrewjamiefolsom
Liam Andrew
authored andcommitted
Add tag filtering capability to search endpoint
1 parent 2e76d88 commit db91a3a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

web.js

+4
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ app.get('/api/search', tokenOK, function(req, res) {
216216
break;
217217
}
218218

219+
if (req.query.tags) {
220+
query.where('tags'). in (req.query.tags.split(/[\s,]+/));
221+
}
222+
219223
query.limit(req.query.limit);
220224

221225
if (req.query.sidebar || req.query.context == "dashboard" || req.query.context == "search") {

0 commit comments

Comments
 (0)