summaryrefslogtreecommitdiff
path: root/app/controllers/projects/templates_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/projects/templates_controller.rb')
-rw-r--r--app/controllers/projects/templates_controller.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/projects/templates_controller.rb b/app/controllers/projects/templates_controller.rb
index 7ab23e39cf0..f4726638777 100644
--- a/app/controllers/projects/templates_controller.rb
+++ b/app/controllers/projects/templates_controller.rb
@@ -7,6 +7,14 @@ class Projects::TemplatesController < Projects::ApplicationController
feature_category :templates
+ def index
+ templates = @template_type.template_subsets(project)
+
+ respond_to do |format|
+ format.json { render json: templates.to_json }
+ end
+ end
+
def show
template = @template_type.find(params[:key], project)