This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
1
'use strict'
2
2
3
3
const peerId = require ( 'peer-id' )
4
- const BlockService = require ( 'ipfs-block-service' )
5
- const DagService = require ( 'ipfs-merkle-dag' ) . DAGService
6
4
const path = require ( 'path' )
7
5
const glob = require ( 'glob' )
8
6
const fs = require ( 'fs' )
@@ -90,9 +88,6 @@ module.exports = function init (self) {
90
88
return callback ( null , true )
91
89
}
92
90
93
- const blocks = new BlockService ( self . _repo )
94
- const dag = new DagService ( blocks )
95
-
96
91
const initDocsPath = path . join ( __dirname , '../../init-files/init-docs' )
97
92
const index = __dirname . lastIndexOf ( '/' )
98
93
@@ -112,7 +107,7 @@ module.exports = function init (self) {
112
107
}
113
108
} ) ,
114
109
pull . filter ( Boolean ) ,
115
- importer ( dag ) ,
110
+ importer ( self . _ipldResolver ) ,
116
111
pull . through ( ( el ) => {
117
112
if ( el . path === 'files/init-docs/docs' ) {
118
113
const hash = mh . toB58String ( el . multihash )
@@ -123,7 +118,9 @@ module.exports = function init (self) {
123
118
}
124
119
} ) ,
125
120
pull . onEnd ( ( err ) => {
126
- if ( err ) return callback ( err )
121
+ if ( err ) {
122
+ return callback ( err )
123
+ }
127
124
128
125
callback ( null , true )
129
126
} )
You can’t perform that action at this time.
0 commit comments