[Groonga-commit] groonga/gcs [master] Generate response for DescribeDomains correctly

Back to archive index

null+****@clear***** null+****@clear*****
2012年 8月 3日 (金) 15:29:58 JST


SHIMODA Hiroshi	2012-08-03 15:29:58 +0900 (Fri, 03 Aug 2012)

  New Revision: ce8a1420d7e09e7a01ed2c667b97bbab16e87642
  https://github.com/groonga/gcs/commit/ce8a1420d7e09e7a01ed2c667b97bbab16e87642

  Log:
    Generate response for DescribeDomains correctly

  Modified files:
    lib/api/2011-02-01/configuration.js

  Modified: lib/api/2011-02-01/configuration.js (+7 -7)
===================================================================
--- lib/api/2011-02-01/configuration.js    2012-08-03 15:20:36 +0900 (e7244cc)
+++ lib/api/2011-02-01/configuration.js    2012-08-03 15:29:58 +0900 (159c2eb)
@@ -32,7 +32,7 @@ function getBaseDomain(domain) {
 
 function createDomainStatus(options) {
   var domainStatus = xmlbuilder.create();
-  domainStatus.begin('DomainStatus', { version: '1.0' })
+  domainStatus.begin(options.element || 'DomainStatus', { version: '1.0' })
     .element('Created').text(options.created || 'false').up()
     .element('Deleted').text(options.deleted || 'false').up()
     .element('DocService')
@@ -124,13 +124,13 @@ function createDomainStatusList(options) {
   var doc = xmlbuilder.create();
   var domainStatusList = doc.begin('DomainStatusList', {version: '1.0'});
   options.domains.forEach(function(domain) {
-    domainStatusList.element('member')
-                    .importXMLBuilder(createDomainStatus({
-                      domain:   domain,
-                      hostname: options.hostname
-                    }));
+    domainStatusList.importXMLBuilder(createDomainStatus({
+                       domain:   domain,
+                       hostname: options.hostname,
+                       element:  'member'
+                     }));
   });
-  return domainStatusList;
+  return doc;
 }
 
 function createDescribeDomainsResponse(options) {
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
Download 



Groonga-commit メーリングリストの案内
Back to archive index