Skip to content

Commit

Permalink
fixed context transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Kravchenko committed Mar 26, 2013
1 parent 13f8607 commit 3430572
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = (server, log, resourcesPath = 'resources') ->
fullUri = "#{currentConfiguringControllerPath}/#{relativeUri}"
currentConfiguringControllerActions.push "#{verb} #{relativeUri}"
server[verb] fullUri, (req, res, next) ->
context =
req.context = res.context =
req: req
res: res
next: (err) ->
Expand All @@ -46,7 +46,7 @@ module.exports = (server, log, resourcesPath = 'resources') ->
err = new restify.ResourceNotFoundError "Object not found"
log.error err
next err
context.next()
req.context.next()

global.GET = (relativeUri, handler = null) -> registerControllerMethod 'get', relativeUri, handler
global.POST = (relativeUri, handler = null) -> registerControllerMethod 'post', relativeUri, handler
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "se7ensky-restify-resource",
"description": "Pretty resource routing for restify",
"version": "1.1.1",
"version": "1.1.2",
"homepage" : "https://github.com/Se7enSky/se7ensky-restify-resource",
"engines": {
"node": "*"
Expand Down

0 comments on commit 3430572

Please sign in to comment.