Commit 8743f765 authored by Shinya Maeda's avatar Shinya Maeda

Use CreatePipelineScheduleService

parent 97bf2401
...@@ -51,8 +51,9 @@ module API ...@@ -51,8 +51,9 @@ module API
authenticate! authenticate!
authorize! :create_pipeline_schedule, user_project authorize! :create_pipeline_schedule, user_project
pipeline_schedule = user_project.pipeline_schedules.create( pipeline_schedule = Ci::CreatePipelineScheduleService
declared_params(include_missing: false).merge(owner: current_user)) .new(user_project, current_user, declared_params(include_missing: false))
.execute
if pipeline_schedule.valid? if pipeline_schedule.valid?
present pipeline_schedule, with: Entities::PipelineSchedule present pipeline_schedule, with: Entities::PipelineSchedule
......
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