summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-01-04 19:13:30 +0100
committerMatija Čupić <matteeyah@gmail.com>2018-01-04 22:17:01 +0100
commitf834e2907d5111f3e2bcd8d0dd126f9e0dd0be7a (patch)
tree337796d2646a3483ceab82d8400793fdf0a3f1f3 /app/controllers
parent7b52a3482ec696320e4a101a80537e4e61118b5c (diff)
downloadgitlab-ce-f834e2907d5111f3e2bcd8d0dd126f9e0dd0be7a.tar.gz
Move cache reset to ci_cd_settings controller
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/settings/ci_cd_controller.rb9
-rw-r--r--app/controllers/projects_controller.rb9
2 files changed, 9 insertions, 9 deletions
diff --git a/app/controllers/projects/settings/ci_cd_controller.rb b/app/controllers/projects/settings/ci_cd_controller.rb
index b029b31f9af..1dcebcb15a6 100644
--- a/app/controllers/projects/settings/ci_cd_controller.rb
+++ b/app/controllers/projects/settings/ci_cd_controller.rb
@@ -11,6 +11,15 @@ module Projects
define_auto_devops_variables
end
+ def reset_cache
+ if ResetProjectCacheService.new(@project, current_user).execute
+ flash[:notice] = _("Project cache successfully reset.")
+ else
+ flash[:error] = _("Unable to reset project cache.")
+ end
+ redirect_to project_pipelines_path(@project)
+ end
+
private
def define_runners_variables
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 928555c200b..6f609348402 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -175,15 +175,6 @@ class ProjectsController < Projects::ApplicationController
)
end
- def reset_cache
- if ResetProjectCacheService.new(@project, current_user).execute
- flash[:notice] = _("Project cache successfully reset.")
- else
- flash[:error] = _("Unable to reset project cache.")
- end
- redirect_to project_pipelines_path(@project)
- end
-
def export
@project.add_export_job(current_user: current_user)