From: Julien HENRY Date: Thu, 13 Jun 2013 08:43:36 +0000 (+0200) Subject: SONAR-4235 Add creation date on "/api/resources" WS X-Git-Tag: 3.7~495 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=021a6413c8627d62957de3f85955be3691ceff18;p=sonarqube.git SONAR-4235 Add creation date on "/api/resources" WS --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb index dbccdec21b0..ab0db2ae28d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb @@ -397,7 +397,8 @@ class Api::ResourcesController < Api::ApiController 'name' => resource.name, 'scope' => resource.scope, 'qualifier' => resource.qualifier, - 'date' => Api::Utils.format_datetime(snapshot.created_at)} + 'date' => Api::Utils.format_datetime(snapshot.created_at), + 'creationDate' => Api::Utils.format_datetime(resource.created_at)} json['lname']=resource.long_name if resource.long_name json['lang']=resource.language if resource.language json['version']=snapshot.version if snapshot.version @@ -488,6 +489,7 @@ class Api::ResourcesController < Api::ApiController xml.lang(resource.language) if resource.language xml.version(snapshot.version) if snapshot.version xml.date(Api::Utils.format_datetime(snapshot.created_at)) + xml.creationDate(Api::Utils.format_datetime(resource.created_at)) xml.description(resource.description) if include_descriptions && resource.description xml.copy(resource.copy_resource_id) if resource.copy_resource_id