diff options
author | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2015-02-19 14:15:01 +0100 |
---|---|---|
committer | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2015-02-19 16:06:24 +0100 |
commit | 9f2fe650aa141d333ffe07f4d0f6d24fe22a414b (patch) | |
tree | a85e7a23c783753a24972b5db6da3d9300b45bca /server/sonar-web | |
parent | 095ff251fdf1a9b2e05e6fcf89e1bfd434c5e5fe (diff) | |
download | sonarqube-9f2fe650aa141d333ffe07f4d0f6d24fe22a414b.tar.gz sonarqube-9f2fe650aa141d333ffe07f4d0f6d24fe22a414b.zip |
SONAR-6199 Add profile key in api/profiles/list WS
Diffstat (limited to 'server/sonar-web')
-rw-r--r-- | server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/profiles_controller.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/profiles_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/profiles_controller.rb index 5897a32b222..0b6f4aa492a 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/profiles_controller.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/api/profiles_controller.rb @@ -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 } |