Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 0a5d629

Browse files
committed
feat: remove rm from dag api
1 parent dd3396b commit 0a5d629

File tree

2 files changed

+0
-44
lines changed

2 files changed

+0
-44
lines changed

API/dag/README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,3 @@ If no `callback` is passed, a [promise][] is returned.
3131
`callback` must follow `function (err, dagNode) {}` signature, where `err` is an error if the operation was not successful and `dagNode` is the IPLD format DAG node retrieved.
3232

3333
If no `callback` is passed, a [promise][] is returned.
34-
35-
#### `dag.remove`
36-
37-
> Deletes an IPLD node
38-
39-
##### `Go` **WIP**
40-
41-
##### `JavaScript` - ipfs.dag.rm(cid, callback)
42-
43-
- `cid` is a [CID][https://github.com/ipfs/js-cid] instance.
44-
45-
`callback` must follow `function (err) {}` signature, where `err` is an error if the operation was not successful.
46-
47-
If no `callback` is passed, a [promise][] is returned.

src/dag.js

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -131,41 +131,11 @@ module.exports = (common) => {
131131
})
132132
})
133133
})
134-
135-
describe('.rm', () => {
136-
let pbNode
137-
138-
before((done) => {
139-
const someData = new Buffer('some other data')
140-
141-
pbNode = DAGNode.create(someData, (err, node) => {
142-
expect(err).to.not.exist
143-
pbNode = node
144-
done()
145-
})
146-
})
147-
148-
it('dag-pb node', (done) => {
149-
ipfs.dag.put(pbNode, 'dag-pb', 'sha2-256', (err) => {
150-
expect(err).to.not.exist
151-
dagPB.util.cid(pbNode, (err, cid) => {
152-
expect(err).to.not.exist
153-
ipfs.dag.get(cid, (err, node) => {
154-
expect(err).to.not.exist
155-
ipfs.dag.rm(cid, done)
156-
// TODO When we get timeouts in js-ipfs, try to fetch again
157-
// and observe it timeout without the node
158-
})
159-
})
160-
})
161-
})
162-
})
163134
})
164135

165136
describe('promise API', () => {
166137
describe('.put', () => {})
167138
describe('.get', () => {})
168-
describe('.rm', () => {})
169139
})
170140
})
171141
}

0 commit comments

Comments
 (0)