Skip to content

Commit

Permalink
Merge pull request #2 from nogorilla/feature/add-patch-route
Browse files Browse the repository at this point in the history
Add patch wrapper
  • Loading branch information
swhite24 authored May 1, 2018
2 parents 2266996 + 9f9532d commit e8a5a7a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,15 @@ class LambdaRouter {
this._wrap('GET', path, hdlr);
}

/**
* Add handler for patch route
* @param {String} path
* @param {Function} hdlr - list of handlers to call in succession
*/
patch(path, ...hdlr) {
this._wrap('PATCH', path, hdlr);
}

/**
* Add handler for post route.
* @param {String} path
Expand Down

0 comments on commit e8a5a7a

Please sign in to comment.