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

Commit

Permalink
feat: adapted to new ipfs-repo API (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgte authored and daviddias committed Jul 4, 2017
1 parent 3734683 commit 5627f47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class BlockService {
return this._bitswap.put(block, callback)
}

this._repo.blockstore.put(block, callback)
this._repo.blocks.put(block, callback)
}

/**
Expand All @@ -76,7 +76,7 @@ class BlockService {
return this._bitswap.putMany(blocks, callback)
}

this._repo.blockstore.putMany(blocks, callback)
this._repo.blocks.putMany(blocks, callback)
}

/**
Expand All @@ -91,7 +91,7 @@ class BlockService {
return this._bitswap.get(cid, callback)
}

return this._repo.blockstore.get(cid, callback)
return this._repo.blocks.get(cid, callback)
}

/**
Expand All @@ -102,7 +102,7 @@ class BlockService {
* @return {void}
*/
delete (cid, callback) {
this._repo.blockstore.delete(cid, callback)
this._repo.blocks.delete(cid, callback)
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/block-service-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ module.exports = (repo) => {
waterfall([
(cb) => bs.put(b, cb),
(cb) => bs.delete(b.cid, cb),
(cb) => bs._repo.blockstore.has(b.cid, cb),
(cb) => bs._repo.blocks.has(b.cid, cb),
(res, cb) => {
expect(res).to.be.eql(false)
cb()
Expand Down

0 comments on commit 5627f47

Please sign in to comment.