Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit 5627f47

Browse files
pgtedaviddias
authored andcommitted
feat: adapted to new ipfs-repo API (#66)
1 parent 3734683 commit 5627f47

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class BlockService {
6161
return this._bitswap.put(block, callback)
6262
}
6363

64-
this._repo.blockstore.put(block, callback)
64+
this._repo.blocks.put(block, callback)
6565
}
6666

6767
/**
@@ -76,7 +76,7 @@ class BlockService {
7676
return this._bitswap.putMany(blocks, callback)
7777
}
7878

79-
this._repo.blockstore.putMany(blocks, callback)
79+
this._repo.blocks.putMany(blocks, callback)
8080
}
8181

8282
/**
@@ -91,7 +91,7 @@ class BlockService {
9191
return this._bitswap.get(cid, callback)
9292
}
9393

94-
return this._repo.blockstore.get(cid, callback)
94+
return this._repo.blocks.get(cid, callback)
9595
}
9696

9797
/**
@@ -102,7 +102,7 @@ class BlockService {
102102
* @return {void}
103103
*/
104104
delete (cid, callback) {
105-
this._repo.blockstore.delete(cid, callback)
105+
this._repo.blocks.delete(cid, callback)
106106
}
107107
}
108108

test/block-service-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ module.exports = (repo) => {
9696
waterfall([
9797
(cb) => bs.put(b, cb),
9898
(cb) => bs.delete(b.cid, cb),
99-
(cb) => bs._repo.blockstore.has(b.cid, cb),
99+
(cb) => bs._repo.blocks.has(b.cid, cb),
100100
(res, cb) => {
101101
expect(res).to.be.eql(false)
102102
cb()

0 commit comments

Comments
 (0)