chore: add workspace id filter on api (#12483)

* chore: add workspace id filter on api
This commit is contained in:
Steven Masley
2024-03-11 11:37:15 -05:00
committed by GitHub
parent 8f40ee3465
commit e3051dff0c
7 changed files with 84 additions and 17 deletions

View File

@ -204,6 +204,12 @@ WHERE
workspaces.template_id = ANY(@template_ids)
ELSE true
END
-- Filter by workspace_ids
AND CASE
WHEN array_length(@workspace_ids :: uuid[], 1) > 0 THEN
workspaces.id = ANY(@workspace_ids)
ELSE true
END
-- Filter by name, matching on substring
AND CASE
WHEN @name :: text != '' THEN