fix archived false api

pull/342/head
Pete Matsyburka 11 months ago
parent 75683631f0
commit eec266ee83

@ -87,7 +87,7 @@ module Api
def filter_templates(templates, params)
templates = Templates.search(templates, params[:q])
templates = params[:archived] ? templates.archived : templates.active
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.joins(:folder).where(folder: { name: params[:folder] }) if params[:folder].present?

Loading…
Cancel
Save