BigW Consortium Gitlab

Commit f6a8894a by Shinya Maeda

Expose last_pipeline only when detailed status

parent 92bc1dda
...@@ -690,7 +690,7 @@ module API ...@@ -690,7 +690,7 @@ module API
expose :id expose :id
expose :description, :ref, :cron, :cron_timezone, :next_run_at, :active expose :description, :ref, :cron, :cron_timezone, :next_run_at, :active
expose :created_at, :updated_at, :deleted_at expose :created_at, :updated_at, :deleted_at
expose :last_pipeline, using: Entities::PipelineBasic expose :last_pipeline, using: Entities::PipelineBasic, if: { type: :full }
expose :owner, using: Entities::UserBasic expose :owner, using: Entities::UserBasic
end end
......
...@@ -31,7 +31,7 @@ module API ...@@ -31,7 +31,7 @@ module API
return not_found!('PipelineSchedule') unless pipeline_schedule return not_found!('PipelineSchedule') unless pipeline_schedule
present pipeline_schedule, with: Entities::PipelineSchedule present pipeline_schedule, with: Entities::PipelineSchedule, type: :full
end end
desc 'Creates a new pipeline schedule' do desc 'Creates a new pipeline schedule' do
...@@ -52,7 +52,7 @@ module API ...@@ -52,7 +52,7 @@ module API
.execute .execute
if pipeline_schedule.persisted? if pipeline_schedule.persisted?
present pipeline_schedule, with: Entities::PipelineSchedule present pipeline_schedule, with: Entities::PipelineSchedule, type: :full
else else
render_validation_error!(pipeline_schedule) render_validation_error!(pipeline_schedule)
end end
...@@ -75,7 +75,7 @@ module API ...@@ -75,7 +75,7 @@ module API
return not_found!('PipelineSchedule') unless pipeline_schedule return not_found!('PipelineSchedule') unless pipeline_schedule
if pipeline_schedule.update(declared_params(include_missing: false)) if pipeline_schedule.update(declared_params(include_missing: false))
present pipeline_schedule, with: Entities::PipelineSchedule present pipeline_schedule, with: Entities::PipelineSchedule, type: :full
else else
render_validation_error!(pipeline_schedule) render_validation_error!(pipeline_schedule)
end end
...@@ -93,7 +93,7 @@ module API ...@@ -93,7 +93,7 @@ module API
return not_found!('PipelineSchedule') unless pipeline_schedule return not_found!('PipelineSchedule') unless pipeline_schedule
if pipeline_schedule.own!(current_user) if pipeline_schedule.own!(current_user)
present pipeline_schedule, with: Entities::PipelineSchedule present pipeline_schedule, with: Entities::PipelineSchedule, type: :full
else else
render_validation_error!(pipeline_schedule) render_validation_error!(pipeline_schedule)
end end
...@@ -110,7 +110,7 @@ module API ...@@ -110,7 +110,7 @@ module API
return not_found!('PipelineSchedule') unless pipeline_schedule return not_found!('PipelineSchedule') unless pipeline_schedule
present pipeline_schedule.destroy, with: Entities::PipelineSchedule present pipeline_schedule.destroy, with: Entities::PipelineSchedule, type: :full
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment