summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorJacopo <beschi.jacopo@gmail.com>2018-01-15 23:03:43 +0100
committerJacopo <beschi.jacopo@gmail.com>2018-01-16 13:11:59 +0100
commitfa84b98796bb63eea42a8685e4a129433efd353f (patch)
tree9b016eec08dd8120f1106055a3f183dd66ebac52 /lib/api
parentbe353219d1eec05a7b04e9c2e94f61573889549d (diff)
downloadgitlab-ce-fa84b98796bb63eea42a8685e4a129433efd353f.tar.gz
Enables Project Milestone Deletion via API
Enables project milestone deletion via DELETE /projects/:id/milestones/:milestone_id
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/project_milestones.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/api/project_milestones.rb b/lib/api/project_milestones.rb
index 0cb209a02d0..306dc0e63d7 100644
--- a/lib/api/project_milestones.rb
+++ b/lib/api/project_milestones.rb
@@ -60,6 +60,15 @@ module API
update_milestone_for(user_project)
end
+ desc 'Remove a project milestone'
+ delete ":id/milestones/:milestone_id" do
+ authorize! :admin_milestone, user_project
+
+ user_project.milestones.find(params[:milestone_id]).destroy
+
+ status(204)
+ end
+
desc 'Get all issues for a single project milestone' do
success Entities::IssueBasic
end