diff options
Diffstat (limited to 'lib/api/milestones.rb')
-rw-r--r-- | lib/api/milestones.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/milestones.rb b/lib/api/milestones.rb index 0b4ed76b35c..44bdaea7fa4 100644 --- a/lib/api/milestones.rb +++ b/lib/api/milestones.rb @@ -31,6 +31,7 @@ module API optional :state, type: String, values: %w[active closed all], default: 'all', desc: 'Return "active", "closed", or "all" milestones' optional :iid, type: Array[Integer], desc: 'The IID of the milestone' + optional :search, type: String, desc: 'The search criteria for the title or description of the milestone' use :pagination end get ":id/milestones" do @@ -39,6 +40,7 @@ module API milestones = user_project.milestones milestones = filter_milestones_state(milestones, params[:state]) milestones = filter_by_iid(milestones, params[:iid]) if params[:iid].present? + milestones = filter_by_search(milestones, params[:search]) if params[:search] present paginate(milestones), with: Entities::Milestone end |