Skip to content

Commit

Permalink
support router.wrapAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
hefangshi committed Aug 16, 2016
1 parent 04f432a commit a7cd307
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yog2-kernel",
"version": "1.3.3",
"version": "1.4.0",
"description": "yog2 kernel",
"main": "index.js",
"keywords": [
Expand Down
4 changes: 4 additions & 0 deletions plugins/dispatcher/dispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ module.exports = function (options) {
router.action = function (actionName) {
return getAction(routerName, actionName);
};
// support wrap raw async fn
router.wrapAsync = function (fn) {
return wrapAsyncFunction(fn, true);
};
// load user defined router
var customRouter = require(routerPath);
// typescript compliant
Expand Down

0 comments on commit a7cd307

Please sign in to comment.