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

Commit 698f708

Browse files
committed
fix: apply CR
1 parent 3bb3ba8 commit 698f708

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

src/cli/commands/object/get.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ module.exports = {
1616
handler (argv) {
1717
waterfall([
1818
(cb) => utils.getIPFS(cb),
19-
(ipfs, cb) => ipfs.object.get(
20-
argv.key,
21-
{ enc: 'base58' },
22-
cb)
19+
(ipfs, cb) => ipfs.object.get(argv.key, {enc: 'base58'}, cb)
2320
], (err, node) => {
2421
if (err) {
2522
throw err

src/http-api/resources/object.js

+6-11
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const dagPB = require('ipld-dag-pb')
66
const DAGLink = dagPB.DAGLink
77
const DAGNode = dagPB.DAGNode
88
const waterfall = require('async/waterfall')
9-
const parallel = require('async/parallel')
109
const series = require('async/series')
1110
const debug = require('debug')
1211
const log = debug('http-api:object')
@@ -472,16 +471,12 @@ exports.patchAddLink = {
472471
}
473472

474473
waterfall([
475-
(cb) => parallel([
476-
(cb) => {
477-
cb(null, linkedObj.size)
478-
},
479-
(cb) => {
480-
cb(null, linkedObj.multihash)
481-
}
482-
], cb),
483-
(stats, cb) => {
484-
cb(null, new DAGLink(name, stats[0], stats[1]))
474+
(cb) => {
475+
const link = new DAGLink(
476+
name,
477+
linkedObj.size,
478+
linkedObj.multihash)
479+
cb(null, link)
485480
},
486481
(link, cb) => ipfs.object.patch.addLink(root, link, cb)
487482
], (err, node) => {

test/http-api/ipfs-api/test-object.js

-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ module.exports = (ctl) => {
7777

7878
ctl.object.put(filePath, {enc: 'json'}, asJson((err, res) => {
7979
expect(err).not.to.exist
80-
console.log(res)
8180
expect(res).to.eql(expectedResult)
8281
done()
8382
}))

0 commit comments

Comments
 (0)