[Groonga-commit] groonga/express-kotoumi [master] Define default "toBackend" filter for REST commands

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Feb 7 19:31:27 JST 2013


YUKI Hiroshi	2013-02-07 19:31:27 +0900 (Thu, 07 Feb 2013)

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

  Log:
    Define default "toBackend" filter for REST commands

  Modified files:
    lib/model.js

  Modified: lib/model.js (+4 -0)
===================================================================
--- lib/model.js    2013-02-07 19:27:17 +0900 (43c7698)
+++ lib/model.js    2013-02-07 19:31:27 +0900 (e47e2bd)
@@ -41,6 +41,10 @@ exports.PublishSubscribe = PublishSubscribe;
 function REST(options) {
   RequestResponse.apply(this, arguments);
   this._modelTypes.push(REST);
+  // default handler
+  this._options.toBackend = this._options.toBackend || function(event, request) {
+    return [event, {}];
+  };
 }
 REST.prototype = new RequestResponse();
 Object.defineProperty(REST.prototype, 'path', {
-------------- next part --------------
HTML����������������������������...
Download 



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