diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2016-04-07 11:59:54 +0300 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2016-04-12 13:37:16 +0300 |
commit | 9d03e8fd5c564b20f3a1ef18583aa4c7c2b27cfc (patch) | |
tree | fa7e742f61f14ff516f536d955a15c4a0a5a0770 /lib/api/milestones.rb | |
parent | 8cb41f19891e4f39c64abd6b2a273625103c5f43 (diff) |
API: Add iid filter to milestones
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 0f3f505fa05..84b4d4cdd6d 100644 --- a/lib/api/milestones.rb +++ b/lib/api/milestones.rb @@ -21,6 +21,7 @@ module API # state (optional) - Return "active" or "closed" milestones # Example Request: # GET /projects/:id/milestones + # GET /projects/:id/milestones?iid=42 # GET /projects/:id/milestones?state=active # GET /projects/:id/milestones?state=closed get ":id/milestones" do @@ -28,6 +29,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? present paginate(milestones), with: Entities::Milestone end |