BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
b838440f
Commit
b838440f
authored
Aug 22, 2012
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate the DELETE method for Issues API
Now returns HTTP Status 405 -
http://httpstatus.es/405
Closes #1245 Closes #1264
parent
0f1ca8b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
issues.rb
lib/api/issues.rb
+2
-3
issues_spec.rb
spec/api/issues_spec.rb
+2
-3
No files found.
lib/api/issues.rb
View file @
b838440f
...
...
@@ -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
...
...
spec/api/issues_spec.rb
View file @
b838440f
...
...
@@ -63,9 +63,8 @@ describe Gitlab::API do
describe
"DELETE /projects/:id/issues/:issue_id"
do
it
"should delete a project issue"
do
expect
{
delete
"
#{
api_prefix
}
/projects/
#{
project
.
code
}
/issues/
#{
issue
.
id
}
?private_token=
#{
user
.
private_token
}
"
}.
to
change
{
Issue
.
count
}.
by
(
-
1
)
delete
"
#{
api_prefix
}
/projects/
#{
project
.
code
}
/issues/
#{
issue
.
id
}
?private_token=
#{
user
.
private_token
}
"
response
.
status
.
should
==
405
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment