]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6199 Add profile key in api/profiles/list WS
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Thu, 19 Feb 2015 13:15:01 +0000 (14:15 +0100)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Thu, 19 Feb 2015 15:06:24 +0000 (16:06 +0100)
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/profiles_controller.rb

index 5897a32b2227879bddf1f31b1b9c1f6ce563dbfd..0b6f4aa492a528d296f99a69482f02f6631103bd 100644 (file)
@@ -69,7 +69,12 @@ class Api::ProfilesController < Api::ApiController
       end
     end
 
-    json = profiles.compact.map { |profile| {:name => profile.name, :language => profile.language, :default => default_profile_by_language[profile.language].name == profile.name } }
+    json = profiles.compact.map { |profile| {
+      :key => profile.key,
+      :name => profile.name,
+      :language => profile.language,
+      :default => default_profile_by_language[profile.language].name == profile.name
+    } }
     respond_to do |format|
       format.json { render :json => jsonp(json) }
       format.xml { render :xml => xml_not_supported }