add slug filter

This commit is contained in:
Pete Matsyburka committed 2025-04-15 13:22:02 +03:00
1 parent d1cfc64adc
commit 67be785e69
3 files changed
+31 -20

No files matched your search

@@ -90,6 +90,7 @@ module Api
templates = params[:archived].in?(['true', true]) ? templates.archived : templates.active
templates = templates.where(external_id: params[:application_key]) if params[:application_key].present?
templates = templates.where(external_id: params[:external_id]) if params[:external_id].present?
templates = templates.where(slug: params[:slug]) if params[:slug].present?
templates = templates.joins(:folder).where(folder: { name: params[:folder] }) if params[:folder].present?
templates