Merge branch 'reduce-imports_controller-diff-with-ce' into 'master'
Make Projects::ImportsController EE-compatible See merge request gitlab-org/gitlab-ce!23883
This commit is contained in:
commit
257a61e8dd
1 changed files with 5 additions and 5 deletions
|
@ -13,7 +13,7 @@ class Projects::ImportsController < Projects::ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
if @project.update(safe_import_params)
|
if @project.update(import_params)
|
||||||
@project.import_state.reload.schedule
|
@project.import_state.reload.schedule
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -66,11 +66,11 @@ class Projects::ImportsController < Projects::ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def import_params
|
def import_params_attributes
|
||||||
params.require(:project).permit(:import_url)
|
[:import_url]
|
||||||
end
|
end
|
||||||
|
|
||||||
def safe_import_params
|
def import_params
|
||||||
import_params
|
params.require(:project).permit(import_params_attributes)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue