aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/webapp
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2016-12-14 11:27:15 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2016-12-15 14:44:17 +0100
commit154e542a066ba371691c569a9921a5a6d9e5fa58 (patch)
tree8eb6d516a8d3e48b70763616dc3f7ff38316498a /server/sonar-web/src/main/webapp
parent4377c049eab9efbf8ecb56caf1fd3c0c779a0731 (diff)
downloadsonarqube-154e542a066ba371691c569a9921a5a6d9e5fa58.tar.gz
sonarqube-154e542a066ba371691c569a9921a5a6d9e5fa58.zip
SONAR-7292 Replace Ruby WS api/issues/add_comment
Diffstat (limited to 'server/sonar-web/src/main/webapp')
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/issues_controller.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/issues_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/issues_controller.rb
index eeddc513044..fc54c82edde 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/issues_controller.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/issues_controller.rb
@@ -22,34 +22,6 @@
class Api::IssuesController < Api::ApiController
#
- # POST /api/issues/add_comment?issue=<key>&text=<text>
- #
- # -- Mandatory parameters
- # 'issue' is the key of an existing issue
- # 'text' is the markdown message. It can be set as an URL parameter or as the post request body.
- #
- # -- Example
- # curl -X POST -v -u admin:admin 'http://localhost:9000/api/issues/add_comment?issue=4a2881e7-825e-4140-a154-01f420c43d11&text=foooo'
- #
- def add_comment
- verify_post_request
- require_parameters :issue, :text
-
- text = Api::Utils.read_post_request_param(params[:text])
- result = Internal.issues.addComment(params[:issue], text)
-
- http_status = (result.ok ? 200 : 400)
- hash = result_to_hash(result)
- hash[:comment] = Issue.comment_to_hash(result.get) if result.get
-
- respond_to do |format|
- # if the request header "Accept" is "*/*", then the default format is the first one (json)
- format.json { render :json => jsonp(hash), :status => result.httpStatus }
- format.xml { render :xml => hash.to_xml(:skip_types => true, :root => 'sonar', :status => http_status) }
- end
- end
-
- #
# POST /api/issues/delete_comment?key=<key>
#
# -- Mandatory parameters