From 021a6413c8627d62957de3f85955be3691ceff18 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Thu, 13 Jun 2013 10:43:36 +0200 Subject: [PATCH] SONAR-4235 Add creation date on "/api/resources" WS --- .../WEB-INF/app/controllers/api/resources_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.39.5