diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-03-22 02:37:19 +0900 |
---|---|---|
committer | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-03 02:11:51 +0900 |
commit | 22a4d124f70598c7c21b08b11db3f38c7bcb71ec (patch) | |
tree | e9abd29cc89995c66b499ce8200d6bcf69de969e /lib/api/pipelines.rb | |
parent | 98ac988d4d9525b3f07a19e495a9c2666ebee3c6 (diff) | |
download | gitlab-ce-22a4d124f70598c7c21b08b11db3f38c7bcb71ec.tar.gz |
Use JSON type for sorting parameter (halfway)
Diffstat (limited to 'lib/api/pipelines.rb')
-rw-r--r-- | lib/api/pipelines.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/pipelines.rb b/lib/api/pipelines.rb index b0f586b08da..6bbb679cb5e 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 :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' + 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 end get ':id/pipelines' do authorize! :read_pipeline, user_project |