summaryrefslogtreecommitdiff
path: root/app/controllers/projects/clusters
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/projects/clusters')
-rw-r--r--app/controllers/projects/clusters/applications_controller.rb29
1 files changed, 0 insertions, 29 deletions
diff --git a/app/controllers/projects/clusters/applications_controller.rb b/app/controllers/projects/clusters/applications_controller.rb
deleted file mode 100644
index bcea96bce94..00000000000
--- a/app/controllers/projects/clusters/applications_controller.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class Projects::Clusters::ApplicationsController < Projects::ApplicationController
- before_action :cluster
- before_action :authorize_read_cluster!
- before_action :authorize_create_cluster!, only: [:create]
-
- def create
- Clusters::Applications::CreateService
- .new(@cluster, current_user, create_cluster_application_params)
- .execute(request)
-
- head :no_content
- rescue Clusters::Applications::CreateService::InvalidApplicationError
- render_404
- rescue StandardError
- head :bad_request
- end
-
- private
-
- def cluster
- @cluster ||= project.clusters.find(params[:id]) || render_404
- end
-
- def create_cluster_application_params
- params.permit(:application, :hostname)
- end
-end