This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,7 @@ module.exports = {
16
16
handler ( argv ) {
17
17
waterfall ( [
18
18
( 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 )
23
20
] , ( err , node ) => {
24
21
if ( err ) {
25
22
throw err
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ const dagPB = require('ipld-dag-pb')
6
6
const DAGLink = dagPB . DAGLink
7
7
const DAGNode = dagPB . DAGNode
8
8
const waterfall = require ( 'async/waterfall' )
9
- const parallel = require ( 'async/parallel' )
10
9
const series = require ( 'async/series' )
11
10
const debug = require ( 'debug' )
12
11
const log = debug ( 'http-api:object' )
@@ -472,16 +471,12 @@ exports.patchAddLink = {
472
471
}
473
472
474
473
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 )
485
480
} ,
486
481
( link , cb ) => ipfs . object . patch . addLink ( root , link , cb )
487
482
] , ( err , node ) => {
You can’t perform that action at this time.
0 commit comments