Skip to content

Commit

Permalink
upgrade js-ipfs-api
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Nov 23, 2015
1 parent 083c3be commit bbc2e72
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var ipfs = require('ipfs-api')
var block = require('./lib/block')
var dag = require('./lib/dag')
// var block = require('./lib/block')
// var dag = require('./lib/dag')
var mfs = require('./lib/mfs')

module.exports = function (opts) {
Expand All @@ -12,8 +12,8 @@ module.exports = function (opts) {
var node = ipfs(opts.host, opts.port)

return {
block: block(node),
dag: dag(node),
// block: block(node),
// dag: dag(node),
mfs: mfs(node)
}
}
6 changes: 4 additions & 2 deletions lib/mfs.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ module.exports = function (node) {

node.files.rm(store.baseDir + opts.key, {}, function (err) {
if (err) {
console.log(err)
return cb(err)
// console.log('error ->', err)
return cb()
// TODO files API is responding with 500 (probably cause of bitswap)
// return cb(err)
}

cb()
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
"store",
"content"
],
"author": "Travis Person <[email protected]> (http://travisperson.com)",
"author": [
"David Dias <[email protected]> (http://daviddias.me)",
"Travis Person <[email protected]> (http://travisperson.com)"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/ipfs/ipfs-blob-store/issues"
Expand All @@ -39,7 +42,7 @@
"dependencies": {
"async": "^1.2.0",
"base58-native": "^0.1.4",
"ipfs-api": "git+https://github.com/ipfs/js-ipfs-api.git#f5ae644 ",
"ipfs-api": "github:ipfs/js-ipfs-api#ba85b3b",
"multihashes": "^0.2.0"
}
}
2 changes: 1 addition & 1 deletion tests/mfs.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var common = {
})
},
teardown: function (t, store, blob, cb) {
store.node.files.rm(store.baseDir, { 'r': true }, function (err) {
store.node.files.rm(store.baseDir, { 'recursive': true }, function (err) {
if (err) {
return cb(err)
}
Expand Down

0 comments on commit bbc2e72

Please sign in to comment.