Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
node tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Nov 3, 2016
1 parent 5917214 commit b601216
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"multiaddr": "^2.0.3",
"multipart-stream": "^2.0.1",
"ndjson": "^1.4.3",
"peer-id": "^0.7.0",
"peer-info": "^0.7.1",
"peer-id": "^0.8.0",
"peer-info": "^0.8.0",
"promisify-es6": "^1.0.2",
"qs": "^6.3.0",
"stream-http": "^2.4.1",
Expand Down
7 changes: 3 additions & 4 deletions src/api/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ module.exports = (send) => {
return callback(err)
}
if (Buffer.isBuffer(res)) {
Block.create(res, callback)
callback(null, new Block(res))
} else {
res.pipe(bl((err, data) => {
if (err) {
return callback(err)
}
Block.create(data, callback)
callback(null, new Block(data))
}))
}
})
Expand Down Expand Up @@ -85,8 +85,7 @@ module.exports = (send) => {
if (err) {
return callback(err)
}

Block.create(block, callback)
callback(null, new Block(block))
})
})
}
Expand Down

0 comments on commit b601216

Please sign in to comment.