Prefer to use overrides on PipelinesController
This commit is contained in:
parent
95e220de3a
commit
c651191d14
1 changed files with 5 additions and 1 deletions
|
@ -69,7 +69,7 @@ class Projects::PipelinesController < Projects::ApplicationController
|
|||
|
||||
render json: PipelineSerializer
|
||||
.new(project: @project, current_user: @current_user)
|
||||
.represent(@pipeline, grouped: true)
|
||||
.represent(@pipeline, show_represent_params)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -157,6 +157,10 @@ class Projects::PipelinesController < Projects::ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def show_represent_params
|
||||
{ grouped: true }
|
||||
end
|
||||
|
||||
def create_params
|
||||
params.require(:pipeline).permit(:ref, variables_attributes: %i[key secret_value])
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue