diff options
Diffstat (limited to 'lib/api/project_templates.rb')
-rw-r--r-- | lib/api/project_templates.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/project_templates.rb b/lib/api/project_templates.rb index 8ec67988e39..2360a7e6b2a 100644 --- a/lib/api/project_templates.rb +++ b/lib/api/project_templates.rb @@ -32,6 +32,8 @@ module API use :pagination end get ':id/templates/:type' do + bad_request! if params[:type] == 'metrics_dashboard_ymls' && Feature.enabled?(:remove_monitor_metrics) + templates = TemplateFinder.all_template_names(user_project, params[:type]).values.flatten present paginate(::Kaminari.paginate_array(templates)), with: Entities::TemplatesList @@ -60,6 +62,8 @@ module API end get ':id/templates/:type/:name', requirements: TEMPLATE_NAMES_ENDPOINT_REQUIREMENTS do + bad_request! if params[:type] == 'metrics_dashboard_ymls' && Feature.enabled?(:remove_monitor_metrics) + begin template = TemplateFinder.build( params[:type], |