[Groonga-commit] groonga/express-kotoumi [master] Ignore not-definition properties

Zurück zum Archiv-Index

YUKI Hiroshi null+****@clear*****
Tue Feb 5 17:32:25 JST 2013


YUKI Hiroshi	2013-02-05 17:32:25 +0900 (Tue, 05 Feb 2013)

  New Revision: 86916ef9e7f4e52b23f0978c02b658c2e47ad6d9
  https://github.com/groonga/express-kotoumi/commit/86916ef9e7f4e52b23f0978c02b658c2e47ad6d9

  Log:
    Ignore not-definition properties

  Modified files:
    lib/frontend/rest-adaptor.js

  Modified: lib/frontend/rest-adaptor.js (+4 -1)
===================================================================
--- lib/frontend/rest-adaptor.js    2013-02-05 17:30:25 +0900 (8cf844e)
+++ lib/frontend/rest-adaptor.js    2013-02-05 17:32:25 +0900 (352e076)
@@ -61,12 +61,15 @@ exports.register = function(application, params) {
 
     Object.keys(commandSets).forEach(function(command) {
       var definition = commandSets[command];
-      unifiedCommandSet[command] = definition;
+      if (definition.method)
+        unifiedCommandSet[command] = definition;
     });
   });
 
   Object.keys(unifiedCommandSet).forEach(function(command) {
     var definition = unifiedCommandSet[command];
+    if (!definition.method)
+      return;
     var method = getRegisterationMethod(definition.method);
     application[method](
       prefix + definition.path,
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index