Commit 69599657 authored by Iuri Matias's avatar Iuri Matias

add missing stringify

parent ed598c0b
......@@ -19,7 +19,7 @@ app.get('/', (req, res) => {
app.use((req, res) => {
provider.sendAsync(req.body, (err, jsonResponse) => {
if (err) {
return res.send({error: err})
return res.send(JSON.stringify({error: err}))
}
res.send(jsonResponse)
})
......@@ -29,7 +29,7 @@ app.ws('/', (ws, req) => {
ws.on('message', function (msg) {
provider.sendAsync(JSON.parse(msg), (err, jsonResponse) => {
if (err) {
return ws.send({error: err})
return ws.send(JSON.stringify({error: err}))
}
ws.send(JSON.stringify(jsonResponse))
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment