Parse daemon request
This commit is contained in:
parent
8ea8e81e89
commit
361b5ffb81
1 changed files with 3 additions and 3 deletions
|
@ -71,12 +71,12 @@ app.get('/forward', function(req, res) {
|
||||||
url: "http://daemon.lbry.tech",
|
url: "http://daemon.lbry.tech",
|
||||||
qs: req.query
|
qs: req.query
|
||||||
}, function(error, response, body) {
|
}, function(error, response, body) {
|
||||||
// Should we parse the body before forwarding?
|
// Should we filter the body parameters before forwarding to user?
|
||||||
|
body = JSON.parse(body);
|
||||||
if(typeof body.error != "undefined") {
|
if(typeof body.error != "undefined") {
|
||||||
logSlackError('ERROR: Got error from daemon: ' + JSON.stringify(body.error));
|
logSlackError('ERROR: Got error from daemon: ' + JSON.stringify(body.error));
|
||||||
}
|
}
|
||||||
res.setHeader('Content-Type', 'application/json');
|
res.json(body);
|
||||||
res.send(body);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue