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
diff options
context:
space:
mode:
authorShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-03-24 10:06:19 +0300
committerShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-05-02 20:11:51 +0300
commit0e8266f2386351906e2d6357282e011d373b2c94 (patch)
tree34dabbb70d716df5ad123875d24210bdc0d83115 /lib/api/pipelines.rb
parent22a4d124f70598c7c21b08b11db3f38c7bcb71ec (diff)
Revert "Use JSON type for sorting parameter (halfway)"
This reverts commit 34127cb13ad72f65a24bdc8fc051363d3edd77cb.
Diffstat (limited to 'lib/api/pipelines.rb')
-rw-r--r--lib/api/pipelines.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/pipelines.rb b/lib/api/pipelines.rb
index 6bbb679cb5e..b0f586b08da 100644
--- a/lib/api/pipelines.rb
+++ b/lib/api/pipelines.rb
@@ -22,10 +22,10 @@ module API
optional :yaml_errors, type: Boolean, desc: 'If true, returns only yaml error pipelines'
optional :name, type: String, desc: 'The name of user who triggered pipelines'
optional :username, type: String, desc: 'The username of user who triggered pipelines'
- optional :sort, type: JSON, desc: 'order_by and asc_desc' do
- requires :order_by, type: String, values: %w[id status ref user_id]
- requires :asc_desc, type: String, values: %w[asc desc]
- end
+ optional :order_by, type: String, values: %w[id status ref user_id], default: 'id',
+ desc: 'The order_by which is combined with a sort'
+ optional :sort, type: String, values: %w[asc desc], default: 'desc',
+ desc: 'The sort method which is combined with an order_by'
end
get ':id/pipelines' do
authorize! :read_pipeline, user_project