]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5811 Use the new /api/sources/raw WS instead of the deprecated /api/sources
authorStas Vilchik <vilchiks@gmail.com>
Thu, 4 Dec 2014 13:29:53 +0000 (14:29 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 4 Dec 2014 13:29:53 +0000 (14:29 +0100)
server/sonar-web/src/main/coffee/component-viewer/main.coffee

index 54f56b2f3f3ff6e3c1888c307ffea4b15889ce36..a35083017ff407d390794750e521cde14517897c 100644 (file)
@@ -40,7 +40,7 @@ define [
 
   API_COMPONENT = "#{baseUrl}/api/components/app"
   API_SOURCES = "#{baseUrl}/api/sources/show"
-  API_RAW_SOURCES = "#{baseUrl}/api/sources"
+  API_RAW_SOURCES = "#{baseUrl}/api/sources/raw"
   API_MEASURES = "#{baseUrl}/api/resources"
   API_TESTS = "#{baseUrl}/api/tests/show"
 
@@ -347,7 +347,7 @@ define [
 
     showRawSources: ->
       key = encodeURIComponent @component.get 'key'
-      url = "#{API_RAW_SOURCES}?resource=#{key}&format=txt"
+      url = "#{API_RAW_SOURCES}?key=#{key}"
       location.href = url