fix(xo-server/callProxyMethod): all lines should be JSON parsed

This commit is contained in:
Julien Fontanet 2020-06-30 12:03:52 +02:00
parent 237ec38003
commit e360f53a40

View File

@ -358,10 +358,10 @@ export default class Proxy {
await this.updateProxy(id, { authenticationToken })
}
const lines = pumpify.obj(response, split2())
const lines = pumpify.obj(response, split2(JSON.parse))
const firstLine = await readChunk(lines)
const { result, error } = parse(String(firstLine))
const { result, error } = parse(firstLine)
if (error !== undefined) {
throw error
}