Skip to content

Commit

Permalink
add a shortcut @JSON to @response.json
Browse files Browse the repository at this point in the history
  • Loading branch information
imzshh authored and QaDeS committed Mar 4, 2012
1 parent 725e010 commit c632c90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/zappa.coffee
Expand Up @@ -258,6 +258,7 @@ zappa.app = (func) ->
session: req.session
response: res
next: next
json: -> res.json.apply res, arguments
send: -> res.send.apply res, arguments
redirect: -> res.redirect.apply res, arguments
render: ->
Expand Down Expand Up @@ -453,4 +454,4 @@ module.exports = zappa.run
module.exports.run = zappa.run
module.exports.app = zappa.app
module.exports.adapter = zappa.adapter
module.exports.version = zappa.version
module.exports.version = zappa.version

0 comments on commit c632c90

Please sign in to comment.