Correctly forward req & res in Xo#_handleHttpRequest().
This commit is contained in:
parent
75e3949cec
commit
2689fd17d0
@ -456,7 +456,7 @@ export default class Xo extends EventEmitter {
|
|||||||
delete watchers[url]
|
delete watchers[url]
|
||||||
|
|
||||||
const {fn, data} = watcher
|
const {fn, data} = watcher
|
||||||
Bluebird.try(fn, [data]).then(
|
Bluebird.try(fn, [req, res, data]).then(
|
||||||
result => {
|
result => {
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
res.end(JSON.stringify(result))
|
res.end(JSON.stringify(result))
|
||||||
|
Loading…
Reference in New Issue
Block a user