Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-05-27 16:31:22 +0300
committerShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-05-30 17:55:09 +0300
commit3b61451c46f462b392783b282fe63dbddd8b6c2e (patch)
treeab12ec8d4b49a403fafb6ad1362bc36955cc0661 /lib
parent63ca126e977666335d7e5f70665815d1289a6f34 (diff)
Return 202 for destory. Remove []. Remove def pipeline_schedules from helper.
Diffstat (limited to 'lib')
-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