summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2012-08-22 13:26:09 -0400
committerRobert Speicher <rspeicher@gmail.com>2012-08-22 13:26:09 -0400
commitb838440f15fbc56d0504162fcff376cacf9c8186 (patch)
treef92a9daf0d87473d438461ff6e79cbf8bc8e074e /lib
parent0f1ca8b3e7454a6fa788f8e57607b95f3195e145 (diff)
downloadgitlab-ce-b838440f15fbc56d0504162fcff376cacf9c8186.tar.gz
Deprecate the DELETE method for Issues API
Now returns HTTP Status 405 - http://httpstatus.es/405 Closes #1245 Closes #1264
Diffstat (limited to 'lib')
-rw-r--r--lib/api/issues.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/api/issues.rb b/lib/api/issues.rb
index 2abc20ad34e..836c2818544 100644
--- a/lib/api/issues.rb
+++ b/lib/api/issues.rb
@@ -95,7 +95,7 @@ module Gitlab
end
end
- # Delete a project issue
+ # Delete a project issue (deprecated)
#
# Parameters:
# id (required) - The ID or code name of a project
@@ -103,8 +103,7 @@ module Gitlab
# Example Request:
# DELETE /projects/:id/issues/:issue_id
delete ":id/issues/:issue_id" do
- @issue = user_project.issues.find(params[:issue_id])
- @issue.destroy
+ error!({'message' => 'method not allowed'}, 405)
end
end
end