Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix: apply CR
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Nov 25, 2016
1 parent 3bb3ba8 commit 698f708
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
5 changes: 1 addition & 4 deletions src/cli/commands/object/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ module.exports = {
handler (argv) {
waterfall([
(cb) => utils.getIPFS(cb),
(ipfs, cb) => ipfs.object.get(
argv.key,
{ enc: 'base58' },
cb)
(ipfs, cb) => ipfs.object.get(argv.key, {enc: 'base58'}, cb)
], (err, node) => {
if (err) {
throw err
Expand Down
17 changes: 6 additions & 11 deletions src/http-api/resources/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const dagPB = require('ipld-dag-pb')
const DAGLink = dagPB.DAGLink
const DAGNode = dagPB.DAGNode
const waterfall = require('async/waterfall')
const parallel = require('async/parallel')
const series = require('async/series')
const debug = require('debug')
const log = debug('http-api:object')
Expand Down Expand Up @@ -472,16 +471,12 @@ exports.patchAddLink = {
}

waterfall([
(cb) => parallel([
(cb) => {
cb(null, linkedObj.size)
},
(cb) => {
cb(null, linkedObj.multihash)
}
], cb),
(stats, cb) => {
cb(null, new DAGLink(name, stats[0], stats[1]))
(cb) => {
const link = new DAGLink(
name,
linkedObj.size,
linkedObj.multihash)
cb(null, link)
},
(link, cb) => ipfs.object.patch.addLink(root, link, cb)
], (err, node) => {
Expand Down
1 change: 0 additions & 1 deletion test/http-api/ipfs-api/test-object.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ module.exports = (ctl) => {

ctl.object.put(filePath, {enc: 'json'}, asJson((err, res) => {
expect(err).not.to.exist
console.log(res)
expect(res).to.eql(expectedResult)
done()
}))
Expand Down

0 comments on commit 698f708

Please sign in to comment.