summaryrefslogtreecommitdiff
path: root/lib/api/pipeline_schedules.rb
diff options
context:
space:
mode:
authorShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-05-27 22:31:22 +0900
committerShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-05-30 23:55:09 +0900
commit3b61451c46f462b392783b282fe63dbddd8b6c2e (patch)
treeab12ec8d4b49a403fafb6ad1362bc36955cc0661 /lib/api/pipeline_schedules.rb
parent63ca126e977666335d7e5f70665815d1289a6f34 (diff)
downloadgitlab-ce-3b61451c46f462b392783b282fe63dbddd8b6c2e.tar.gz
Return 202 for destory. Remove []. Remove def pipeline_schedules from helper.
Diffstat (limited to 'lib/api/pipeline_schedules.rb')
-rw-r--r--lib/api/pipeline_schedules.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/api/pipeline_schedules.rb b/lib/api/pipeline_schedules.rb
index 52ad682b972..d9509375698 100644
--- a/lib/api/pipeline_schedules.rb
+++ b/lib/api/pipeline_schedules.rb
@@ -114,20 +114,16 @@ module API
not_found!('PipelineSchedule') unless pipeline_schedule
+ status :accepted
present pipeline_schedule.destroy, with: Entities::PipelineScheduleDetails
end
end
helpers do
- def pipeline_schedules
- @pipeline_schedules ||=
- user_project.pipeline_schedules.preload([:owner, :last_pipeline])
- end
-
def pipeline_schedule
@pipeline_schedule ||=
user_project.pipeline_schedules
- .preload([:owner, :last_pipeline])
+ .preload(:owner, :last_pipeline)
.find_by(id: params.delete(:pipeline_schedule_id))
end
end