[Groonga-commit] groonga/gcs [master] Return deleted index field status if existing field is deleted

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Nov 16 17:54:03 JST 2012


YUKI Hiroshi	2012-11-16 17:54:03 +0900 (Fri, 16 Nov 2012)

  New Revision: 053573b67ac7b48fc96c7340a98e4d8bf61fd7c0
  https://github.com/groonga/gcs/commit/053573b67ac7b48fc96c7340a98e4d8bf61fd7c0

  Log:
    Return deleted index field status if existing field is deleted

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

  Modified: lib/api/2011-02-01/configuration.js (+13 -1)
===================================================================
--- lib/api/2011-02-01/configuration.js    2012-11-16 17:44:46 +0900 (20dfff9)
+++ lib/api/2011-02-01/configuration.js    2012-11-16 17:54:03 +0900 (01eaac8)
@@ -373,9 +373,21 @@ handlers.DeleteIndexField = function(context, request, response, config) {
       }, {
         NAME_FIELD: 'indexFieldName'
       });
+
+  var createdAt = new Date();
+  var result = null;
+  if (field.exists()) {
+    result = createIndexFieldStatus({
+      field: field,
+      createdAt: createdAt,
+      updatedAt: createdAt
+    });
+  }
+
   field.deleteSync();
+
   response.contentType('application/xml');
-  response.send(createGenericResponse('DeleteIndexField', null, request.id));
+  response.send(createGenericResponse('DeleteIndexField', result, request.id));
 };
 
 function createIndexFields(fields) {
-------------- next part --------------
HTML����������������������������...
下載 



More information about the Groonga-commit mailing list
Back to archive index