# HG changeset patch # User Tomas Zeman # Date 1387054088 -3600 # Node ID 26148011541ff9e0c15d154936614ee241627bc3 # Parent 411d80fcd66cf11615eb1fb038266f3d1f0f9cad Simpler POST diff -r 411d80fcd66c -r 26148011541f .hgignore --- a/.hgignore Sat Dec 14 21:40:24 2013 +0100 +++ b/.hgignore Sat Dec 14 21:48:08 2013 +0100 @@ -1,1 +1,2 @@ node_modules +package.js diff -r 411d80fcd66c -r 26148011541f server.coffee --- a/server.coffee Sat Dec 14 21:40:24 2013 +0100 +++ b/server.coffee Sat Dec 14 21:48:08 2013 +0100 @@ -20,16 +20,16 @@ response: rs } 'post': Apps.Method { - 'POST': new Apps.Chain().use(Apps.JsonRequest).use(() => (o, rq, rs) => { + 'POST': Apps.JsonRequest((o, rq, rs) => { status: 200 headers: {} data: - post: o + data: o request: path: rq.path pathInfo: rq.pathInfo response: rs - }).end() + }) }, Apps.methodNotAllowed }