Skip to content

Commit 8a88734

Browse files
authored
Add support for filtering by concept name
Fixes #267
1 parent 5774503 commit 8a88734

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

v2/definitions/strat_name_concepts.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ module.exports = function (req, res, next, cb) {
4242
req.query.strat_name_concept_id,
4343
);
4444
}
45+
} else if ("name" in req.query) {
46+
where.push("name = ANY(:concept_name)");
47+
params["concept_name"] = req.query.name;
4548
} else if (req.query.strat_name_id) {
4649
where.push(
4750
"concept_id IN (SELECT concept_id FROM macrostrat.lookup_strat_names WHERE strat_name_id IN (:strat_name_ids))",

0 commit comments

Comments
 (0)