]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4235 Add creation date on "/api/resources" WS
authorJulien HENRY <julien.henry@sonarsource.com>
Thu, 13 Jun 2013 08:43:36 +0000 (10:43 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Thu, 13 Jun 2013 09:26:06 +0000 (11:26 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/api/resources_controller.rb

index dbccdec21b0a988ffb31edb5b27d3abb3ee0f0f0..ab0db2ae28dc1ed1f31ab13f75ed81e10db2b299 100644 (file)
@@ -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